• Resolved paulswarthout

    (@paulswarthout)


    I stumbled upon an issue with your plugin. I tried to delete a cron job, but got a popup message “wrong_nonce” instead and it didn’t delete it. It happened over and over.

    I found a message in the log file.

    Warning: Attempt to read property ‘hash’ on bool in …\advanced-cron-manager\inc\Cron\EventsActions.php on line 166.

    I got this in my test environment — Local (by Flywheel) Ver 6.1.8, running WordPress 5.8.2 on nginx with MySQL 8.0.16 and PHP 8.0.0.

    My workaround was to use wp_unschedule_event() to delete the jobs. But it would have been nicer if your plugin had worked.

    I have a theory. I’m working on a plugin of my own. As such I’m scheduling my own cron job and testing it, which gives me numerous chances to delete created jobs before re-running my code (where it creates the job.) In testing, I created a new schedule for 15 seconds and set my job to execute every 15 seconds.

    When looking at the list of jobs in your plugin, my job shows ‘In Queue’ instead of the time that it’s supposed to run next. Is it possible that when the job is loaded and ready to run that that somehow stops the job deletion from working correctly in your plugin?

    Anyway, I like your plugin and will keep using it. I was able to delete other cron jobs that weren’t ‘in queue’.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Kuba Mikita

    (@kubitomakita)

    Thank you for the report! “In queue” simply means that the job execution time has been reached and it will be processed on the next request. It doesn’t move the job anywhere so the removal should work just fine.

    Most likely the job has been executed already, maybe even by the removal request ??

    But the exact error line is helpful and I’ll make sure to test and patch it in the next release.

    Thread Starter paulswarthout

    (@paulswarthout)

    Thank you. But, like I said, the removal did not work when I got that error message.

    “In Queue” was just something I noticed when it didn’t work. I don’t know whether it is connected to the issue or not. I too am a developer. I know how hard it is to track down errors with vague information. I was just trying to be as specific as possible. ??

    rustysamurai

    (@rustysamurai)

    Having the exact same issue as above. I am getting ‘Wrong nonce’ on any actions in the plugin except for adding a new event.

    Any action on the event itself (Remove, Reschedule, Pause) all result in a wrong nonce issue and no action is taken on the cron task.

    Plugins are updated:

    Advanced Cron Manager: Version 2.4.2
    Advanced Cron Manager PRO: Version 2.4.3

    Plugin Author Kuba Mikita

    (@kubitomakita)

    @rustysamurai does that error persist even if you perform the action immediately after loading the Cron Manager page?

    This issue is still on our radar but the patch hasn’t been released yet.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cannot delete cron job’ is closed to new replies.