Site icon Hip-Hop Website Design and Development

How could an event previously scheduled with wp_schedule_event later become unscheduled?

I have an event that runs every minute according to a custom schedule. The event is a function run through add_action() and scheduled using wp_schedule_event(). On this install of WordPress, DISABLE_WP_CRON is set to true and wp_cron.php is set to run in the crontab.

Most of the time everything works fine and every minute the code runs but there have been a number of times lately when something didn’t run and when I went to check the server I found that the event was not scheduled. Specifically that wp_next_scheduled() for my function was returning false and I then had to schedule it with wp_schedule_event which is what is already done in plug-in activation and was done manually the last time this happened.

So my question is: What could be possible causing the previously scheduled event to no longer be scheduled at some later time?

I have the same code running on a staging server and the delisting of the scheduled event doesn’t seem to happen there. I’ve looked at possible differences between the systems (apart from the additional traffic on the production site) that might explain it but can’t figure see anything obvious.

EDIT: Looking further at this I found this from a while back although it doesn’t explain why this might happen but only confirms that the whole framework can’t be relied upon.