• Resolved Bradley Stevens

    (@rhythmelody)


    I’m unsure how this plugin exactly interacts with WP-cron.php

    My understanding is that any scheduled events with WP-cron will only actually trigger once there is a visitor at my website. That will make the WP-cron check to see if the time/date is later than any scheduled events, and if it is– it will fire those events.

    My problem is that I have events that need to happen frequently (a subscription renewal to take place within about 10 minutes of the same time on every billing cycle), but I have very low traffic to the site.

    My question is: will WP-Crontrol force the WP-cron to trigger at the intervals I set… even if there is no traffic?

    I’m assuming that setting the woocommerce_scheduled_sales hook to triggers every 5 or 10 minutes would fix my problem, but I want to confirm: it will fire ever 5 or 10 minutes even if no-one visits my site, correct? or wrong?

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

    (@johnbillion)

    WordPress Core Developer

    Thanks for the message.

    This plugin doesn’t alter the way the cron system works in WordPress. If you don’t have much traffic to your site then there’s no guarantee that cron jobs will fire at the correct time.

    If you need jobs that run at a much more reliable and short interval, you’ll need to set up something that polls your site on a regular basis, or add a real cron job to your web server which fetches the site at a regular interval. Or there are some web services to do that for your, for example easycron.com.

    It’s also worth noting that the minimum supported recurrence for a cron event in WordPress is 10 minutes. I keep meaning to add a notice to WP Crontrol to remind users about that.

    Thread Starter Bradley Stevens

    (@rhythmelody)

    Thanks for your answer, John. It’s all rather confusing… but your answer clears a lot of that up.

    My hosting is shared, so they limit how short I can set the intervals for cron jobs on their end. Easycron looks like a good solution though!

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Interaction with visitor-based-Cron triggers’ is closed to new replies.