Come to find out, this is not caused by an invalid date being stored in the database, because WP-Cron does not store dates (timestamps) directly but serializes the data to a string before storing.
I have determined that the particular issue I am experiencing is caused by two things:
1. Line 212 of class-page-jobs.php has faulty logic. With a ‘gmt_offset’ option value of anything other than zero, the test will always return True even if wp_next_scheduled()
returns False. This causes date_i18n()
, on line 213, to return “December 31, 1969” if the job is not scheduled; instead of correctly reporting that the job is, ‘Not scheduled!’
2. When it comes time to run the single event, the event is removed from the WP-Cron schedule. But, it does not get rescheduled, because the BackWpup job (which would also reschedule the single event), as far as I have been able to determine so far, never runs.
I tried instituting some event logging in the Cron and WPBackup systems to try and see where the disconnect might be. But, it must be getting late, because I’m sure what took the site offline was a 500 Internal Server Error. I’ll try again later after I’ve had some rest to clear my bleary eyes.
To help determine the cause of #2, where would be the best place(s) to put some event logging:
BackWPup_Job::start_http(),
BackWPup_Job::start_wp_cron(),
BackWPup_Job::run(),
BackWPup_Cron::run(), and/or
BackWPup_Cron::cron_active()?
Lee