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

nico.knaepen’s picture

I 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:

maintenance_mode: 1
maintenance_mode_message: 'X site is currently under maintenance. We should be back shortly. Thank you for your patience.'

nico.knaepen’s picture

Status: Active » Closed (won't fix)
arnested’s picture

Version: 7.x-2.0-beta8 » 7.x-2.x-dev
Status: Closed (won't fix) » Fixed

Please 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 to WATCHDOG_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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.