poll cycle vs. wait cycle causes cron not to be executed
Hello!
set daemon 120
The docs say: to specify Monit's poll cycle length and run Monit in daemon mode although monit does not run every X minutes but waits X minutes between runs.
My monit start times
UTC Dec 11 00:30:54
UTC Dec 11 00:32:54
UTC Dec 11 00:34:54
UTC Dec 11 00:36:56
UTC Dec 11 00:38:57
UTC Dec 11 00:40:57
UTC Dec 11 00:42:57
UTC Dec 11 00:44:57
UTC Dec 11 00:46:57
UTC Dec 11 00:48:57
UTC Dec 11 00:50:57
UTC Dec 11 00:52:58
UTC Dec 11 00:54:58
UTC Dec 11 00:56:58
UTC Dec 11 00:58:58
UTC Dec 11 01:00:58
UTC Dec 11 01:02:58
UTC Dec 11 01:05:00
UTC Dec 11 01:07:01
UTC Dec 11 01:09:01
UTC Dec 11 01:11:01
UTC Dec 11 01:13:01
As you may see minute 03 at 01:03:00 is missed. Please advise. Thank you.
Comments (5)
-
reporter -
reporter - edited description
-
repo owner - changed status to closed
The doc also says, do not rely on minutes in the every statement. The reason is that a
poll cycle
only specify sleep time between checks, not how long running all checks will take. For instance, if you monitor remote hosts or local ports, Monit can wait up to 5 seconds before timeout. Checking file content or file systems can also take time. All this adds up so there is no guarantee when a check will run, only that it will run.We plan to improve this in a later release by running each check in a thread-pool and using an even loop so we can guarantee in wall-clock time when a check will run.
-
reporter Thank you for your kind answer.
a poll cycle only specify sleep time between checks, not how long running all checks will take.
Meanwhile could you add one more sentence on this to the manual?
-
reporter For others. A reasonable workaround is to lower poll cycle from 120 to 115
- Log in to comment
This is my cron
every "03,04 * * * *"