wp cron – 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?

Adrian 1 year 2021-12-22T00:13:21-05:00 0 Answers 0 views 0

Leave an answer