Scheduler doesn’t like Sundays?
-
WP version 4.9.1
Plugin version 1.0.10I had some problems with a client who set their backup to run at 3:00 every Sunday. The plugin crashed with a fatal error which meant they couldn’t get into the backend to fix things.
Checking through the crash log and the code, it seems that includes/buwd-cron.php:18 was calling CronExpression::factory(’00 3 * * on’)
‘on’ obviously isn’t a valid day name/number and so, several layers down vendor/aannnaa7/cron-expression-php5/src/Cron/CronExpression.php:130 was throwing an exception
If I changed the day to be Monday then things are fine.
Their job schedule page looked like https://imgur.com/SowTj5G
Crash log:
Fatal error:
Uncaught InvalidArgumentException: Invalid CRON field value on at position 4 in /{redacted}/wp-content/plugins/backup-wd/vendor/aannnaa7/cron-expression-php5/src/Cron/CronExpression.php:130
Stack trace:
#0 /{redacted}/wp-content/plugins/backup-wd/vendor/aannnaa7/cron-expression-php5/src/Cron/CronExpression.php(114): Cron\CronExpression->setPart(4, ‘on’)
#1 /{redacted}/wp-content/plugins/backup-wd/vendor/aannnaa7/cron-expression-php5/src/Cron/CronExpression.php(97): Cron\CronExpression->setExpression(’00 3 * * on’)
#2 /{redacted}/wp-content/plugins/backup-wd/vendor/aannnaa7/cron-expression-php5/src/Cron/CronExpression.php(69): Cron\CronExpression->__construct(’00 3 * * on’, Object(Cron\FieldFactory))
#3 /{redacted}/wp-content/plugins/backup-wd/includes/buwd-cron.php(18): Cron\CronExpression::factory(’00 3 * * on’)
#4 /{redacted}/wp-content/plugins/backup-wd/includes/bu in /{redacted}/wp-content/plugins/backup-wd/vendor/aannnaa7/cron-expression-php5/src/Cron/CronExpression.php on line 130
- The topic ‘Scheduler doesn’t like Sundays?’ is closed to new replies.