• Let’s say, we are using the WordPress function wp_schedule_event() to run a script every hour, does it run on its own? or do I need to use windows task scheduler / cron to do the job?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The answer is in the Codex: wp_schedule_event

    If you really want to run the script every hour and your site has few visitors, use a cron job instead.

    Thread Starter halben

    (@halben)

    So to be clear, wp_schedule_event() is based on visitors meaning the function will only execute when it detects a visitor to your website?

    The Codex says:

    The action will trigger when someone visits your WordPress site…

    If that is not clear, let me know what’s unclear about it and I’ll change the wording to make it clearer.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp_schedule_event question’ is closed to new replies.