[GH-ISSUE #385] Hour ranges in cron expressions are ignored #292

Closed
opened 2026-02-25 23:41:55 +03:00 by kerem · 2 comments
Owner

Originally created by @gpaddis on GitHub (Jun 22, 2020).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/385

I have configured a heartbeat cronjob with the following cron expression: */5 9-23 * * *, i.e. the cron runs daily from 9:00 to 23:55 (last execution). I have set the same expression in the healthchecks configuration with a 5 min grace period, however I keep receiving downtime and uptime notifications at 00:05 and 9:00 respectively.

Is the tool expecting to receive a heartbeat even after 23:55 (and thus ignoring the hour range 9-23) or is there possibly an error in my cron configuration?

Originally created by @gpaddis on GitHub (Jun 22, 2020). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/385 I have configured a heartbeat cronjob with the following cron expression: `*/5 9-23 * * *`, i.e. the cron runs daily from 9:00 to 23:55 (last execution). I have set the same expression in the healthchecks configuration with a 5 min grace period, however I keep receiving downtime and uptime notifications at 00:05 and 9:00 respectively. Is the tool expecting to receive a heartbeat even after 23:55 (and thus ignoring the hour range 9-23) or is there possibly an error in my cron configuration?
kerem closed this issue 2026-02-25 23:41:55 +03:00
Author
Owner

@cuu508 commented on GitHub (Jun 22, 2020):

This is often caused by a timezone mismatch (the server has has one timezone, Healthchecks is configured to use a different one).

Also, if you've recently changed timezone on your server – if the cron daemon was not restarted afterwards it might still be using the old timezone.

<!-- gh-comment-id:647474824 --> @cuu508 commented on GitHub (Jun 22, 2020): This is often caused by a timezone mismatch (the server has has one timezone, Healthchecks is configured to use a different one). Also, if you've recently changed timezone on your server – if the cron daemon was not restarted afterwards it might still be using the old timezone.
Author
Owner

@gpaddis commented on GitHub (Jun 22, 2020):

Hi @cuu508, you are absolutely right. I had not payed attention to the timezone mismatch. I tested it again after the timezone change and it works as expected. Thank you! :)

<!-- gh-comment-id:647542667 --> @gpaddis commented on GitHub (Jun 22, 2020): Hi @cuu508, you are absolutely right. I had not payed attention to the timezone mismatch. I tested it again after the timezone change and it works as expected. Thank you! :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#292
No description provided.