Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5 Minutes Cron jobs still dissappearing. #101

Open
mogmachine opened this issue Jul 14, 2023 · 3 comments
Open

5 Minutes Cron jobs still dissappearing. #101

mogmachine opened this issue Jul 14, 2023 · 3 comments

Comments

@mogmachine
Copy link

mogmachine commented Jul 14, 2023

I note that issue #26 mentioned this quite a while ago. I have a couple of 5 minute cron jobs that keep vanishing completely, all trace from wp_options.

These are critical to my site and there is no mention of 5 minute crons not being possible ...they will work for months and then suddenly vanish - or vanish a couple of times in a week. Are 5 minutes crons still an issue?

@johnbillion
Copy link
Owner

Does WP Crontrol show you a warning about this schedule when you view the Settings -> Cron Schedules screen?

I don't think this problem is anything specific to WP Crontrol, as this plugin allows you to manage the cron events and cron schedules on your site but doesn't affect the way that cron events are run, which is still handled by the native functionality in WordPress.

I suspect the underlying issue is the same as what's being reported here: https://core.trac.wordpress.org/ticket/57271 . There is an issue in WordPress core where a cron event may fail to be rescheduled after it succeeds, in which case it gets lost. Extra logging was added for this in WordPress 6.0 but the underlying issue remains.

Some ideas have been put forward for this in https://wordpress.org/support/topic/cron-being-deleted/ but I've not had time to investigate further.

@mogmachine
Copy link
Author

"My advice would be for your plugin to maintain it’s own database entries in a custom table. Then, that custom table checks against the core crons. Any missing ones, are then added again."

Any chance you might be implementing this soon?

@johnbillion
Copy link
Owner

Maybe, although it's not a priority for me. It doesn't solve the underlying problem of cron events not being correctly rescheduled, it's mostly a workaround.

I think I would prefer to spend this time investigating the cause in WordPress core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants