• Resolved JP3

    (@jp3)


    Hello,

    First time trying your plugin and immeditely noticed an issue with deleting custom cron jobs.

    From the main “Cron Events” tab filtered by “All Events”, I am unable to delete or edit any of the custom cron jobs I’ve added. It gives me a “cron job does not exist” message.

    If I filter it by “Custom Events”, then I can delete / edit them, but only the ones that have actions associated with them.

    If I filter it by “Events with no action”, then I can delete / edit them, but only the ones that do not have actions associated with them.

    Took me a while to figure out how to edit / delete custom cron jobs, and I almost uninstalled before stumbling upon the “filter by” trick to get it done.

    If I’m on the main plugin “Cron Events” page without filters, editing / deleting custom cron jobs just does not work. Says the selected job does not exist, when it clearly does.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter JP3

    (@jp3)

    Kept playing around with it, and now it seems to be working as expected. Not sure why I had the “does not exist” issues above, but it seems to have resolved itself. Marking as solved for now.

    Thread Starter JP3

    (@jp3)

    Spoke too soon. I have a custom cron job that I can’t edit at all. The filter trick isn’t even working anymore.

    I was able to delete it, but every attempt to edit it gave me the dreaded “selected cron job does not exist” message, even though it did exist, and was executing properly on-schedule.

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Thanks for the report.

    I’ve written some info about this problem here which could help: https://github.com/johnbillion/wp-crontrol/wiki/Problems-adding-or-editing-WP-Cron-events.

    What’s the recurrence schedule for the events you’re trying to delete? If the event runs between the time you load the page and the time you try to edit or delete it then the action will fail and unfortunately there’s nothing WP Crontrol can do about that.

    Can you try another cron management plugin such as Advanced Cron Manager and see if that plugin can successfully delete these events? Note that the feedback messages in that plugin are’t always accurate so you’ll need to reload the screen each time.

    Thread Starter JP3

    (@jp3)

    Thanks for the link.

    It appears that I’m asking your plugin to do more than it was designed to do using the default WP Cron system. I’m calling cron jobs every 5 seconds, 10 seconds, and so on to process single API calls and responses for multiple custom queues.

    I’m going to try Advanced Cron Manager, and Advanced Cron Scheduler to see which one fits the bill best.

    Thank you for pointing me in the right direction! I think for less demanding and less frequent tasks, your plugin would be perfect and I’ll keep it mind for the future.

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Ah yeah so what happens is if you take more than 5 seconds to edit or delete an event with a 5 second schedule then most likely it’s already gone and been replaced by the next event before the edit or delete can be recorded.

    To be honest the problem likely isn’t down to the cron plugin you use, it’s that the WordPress cron API isn’t designed for such high frequency events. Advanced Cron Manager is similar to WP Crontrol in that it doesn’t change how events run (it provides advice for switching to server managed cron events though) so that will likely provide no benefit over WP Crontrol.

    Advanced Cron Scheduler may help as it uses Action Scheduler under the hood, but unless you can reliably trigger the WordPress cron spawner at this high frequency then it might not provide any improvement.

    Take a look at the WP Crontrol wiki about this at https://github.com/johnbillion/wp-crontrol/wiki/Cron-events-that-have-missed-their-schedule, particularly the “WP-Cron at scale” section. You might need to implement Cavalcade to handle these high frequency events.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Editing / Deleting Custom Cron Jobs – “Does Not Exist”’ is closed to new replies.