• Got a strange issue, when I use run now on a cron event “wpvulnerability_notification” https://www.ads-software.com/support/topic/notification-not-sent-2/ its not working just got a message “Scheduled the cron event?wpvulnerability_notification?to run now. The original event will not be affected.” in WP Crontrol it doesn’t work but when using another plugin “Advanced Cron Manager” and run the job manually it works and the emails are sent out every time.

    Any ideas why it wont work in WP Crontrol? Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    One of the differences between the two plugins is how they run an event when you click “Run now”. Advanced Cron Manager executes the event action directly, whereas WP Crontrol schedules and runs the event just like WordPress core does.

    It’s a subtle difference that means Advanced Cron Manager will rarely (if ever) fail to run the event because it runs it directly. However it doesn’t run it in the exact same context that WordPress core does, which means there’s a small chance that the behaviour of the event doesn’t match its behaviour when it runs according to its regular schedule.

    WP Crontrol works differently because it schedules the event to run now and then instructs WordPress to run any pending events. This means when it does run it runs in exactly the same manner as it would when it runs according to its regular schedule. However there is a small chance that the event fails to run immediately if there is an issue with the cron runner spawning process on your site (lots of info about this here).

    In your case it might mean there’s a problem with the cron event when it does run properly. I would recommend continuing to chat with the author of the WPVulnerability plugin and also to check your error logs to see if a fatal error or warnings are being logged.

    The reason it doesn’t work is because the hook only works if there is a vulnerability.

    There are 2 ways to run that function. The first one is by the cron. That only works (sends the email) if there is a vulnerability. The second is to click the button to test the function and forces sending the email (with or without vulnerabilities).

    WP Crontab shouldn’t have any reason to fail.

    Thread Starter Jarko Piironen

    (@ipajen)

    Some update info. If i track with WP-Cron Status Checker or Cron Logger after i use “run now”, I can see that the event has been created and marked as completed but no e-mail is created/sent out when checking with WP Mail Logging or php-mail.log when using WP Crontrol. No issues in debug.log or server logs.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Job not working when run now’ is closed to new replies.