Schedule recurring downtime problem

18 views
Skip to first unread message

Manuel Gutiérrez Molina

unread,
Nov 4, 2024, 11:02:14 AM11/4/24
to Thruk
If I create a recurring downtime for every third Sunday of the month, it is not working correctly.

This is what thruk adds to the cron file, and it is running on the first three Sundays of the month instead of the third Sunday.

0 12 * * 0 [ $(date +"\%m") -ne $(date -d "-21days" +"\%m") ] && cd /usr/share/thruk && /bin/bash -l -c '/usr/bin/thruk downtimetask "1"' >/dev/null 2>>/var/lib/thruk/cron.log


It may be a date checking problem, I added this to test if it works.

0 12 15-21 * 0 [ "$(date +\%u)" -eq 7 ] && cd /usr/share/thruk && /bin/bash -l -c '/usr/bin/thruk downtimetask "1" ' >/dev/null 2>>/var/lib/thruk/cron.log



My Thruk version is 3.14.2
Screenshot_4.jpg

Sven Nierlein

unread,
Nov 5, 2024, 3:02:02 AM11/5/24
to th...@googlegroups.com, Manuel Gutiérrez Molina
Hi,

this has been fixed with the v3.16, see https://github.com/sni/Thruk/blob/master/Changes#L58

Cheers,
Sven
> --
> You received this message because you are subscribed to the Google Groups "Thruk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to thruk+un...@googlegroups.com <mailto:thruk+un...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/thruk/ea20091f-d275-4f67-9c82-ea5fee0f97dbn%40googlegroups.com <https://groups.google.com/d/msgid/thruk/ea20091f-d275-4f67-9c82-ea5fee0f97dbn%40googlegroups.com?utm_medium=email&utm_source=footer>.

OpenPGP_signature.asc
Reply all
Reply to author
Forward
0 new messages