• I have a question about how to trigger correctly wp-cron.php for my site. I need manual cron jobs because I have a site that is kind of an archive for RSS feeds with very few actual visits.

    Most tutorials I found tell me to create a cron job with a syntax like this:
    wget -q -O - https://yourwebsite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

    But I can’t do that. My host allows cron jobs with very strict limitations: only URLs, no shell commands like wget. So, I could simply paste the URL, ok?
    https://yourwebsite.com/wp-cron.php?doing_wp_cron

    Wrong again! My host only allows absolute URLs with no parameters, so I can’t include the ?doing_wp_cron bit.

    So, my question is: does yourwebsite.com/wp-cron.php correctly trigger WordPress cron? Is the ?doing_wp_cron bit strictly necessary?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi!

    AFAIK, you do not need any parameters to wp-cron.php. If that doing_wp_cron parameter is not set, the WP will understand you are calling it from an external script and will try to get a lock and continue its job.

    Tigr

    Thread Starter David M.

    (@david-m)

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Run wp-cron.php from cron: correct syntax?’ is closed to new replies.