
If Ultimate Cron is launched while the site is in maintenance mode we log the following to the watchdog:
Cannot launch scheduled jobs while in maintenance mode!
If we run Ultimate Cron every minute we log this quite often if we have longer maintenance periods.
Maybe we could lower the noise a bit.
Or maybe this should be part of Watchdog Filtering instead (deduplication over several requests).
Comments
Comment #1
nico.knaepen CreditAttribution: nico.knaepen at Logic in Motion for Colruyt Group Services commentedI wouldn't lower the noise but rather disable cron execution during maintenance mode. When executing cron through drush you can easily create a script that first checks for the maintenance mode. And if maintenance mode is inactive, you can proceed running the cron command. This script should then be called (within crontab or through some cycle).
For fetching the maintenance status execute this:
drush vget maintenance_mode
If the result then returns the following, then you now the cron job should not be executed. This way no logging is done in database or syslog:
Comment #2
nico.knaepen CreditAttribution: nico.knaepen at Logic in Motion for Colruyt Group Services commentedComment #3
arnested CreditAttribution: arnested at Reload commentedPlease don't mark the issue as "Won't fix" based only on your own opinion.
I talked to @gielfeldt about this issue earlier today and we decided the best solution is to lower the watchdog level of that particular message from
WATCHDOG_ERROR
toWATCHDOG_NOTICE
.It is not an error causing jobs not to be launched during maintenance mode but the intended behavior of Ultimate Cron.
Although it is a normal behavior it is still a significant condition and that's why we log it as
WATCHDOG_NOTICE
.I have pushed a commit changing this.