Anyone can join our Discord free of charge.

Best method for server-managed WP-cron job? wget or others

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #4598
    Helen
    Guest

    I see a lot of options, which is the best

    what is SlickStack using and why did you choose it

    #4599
    Henry
    Guest

    https://crunchify.com/how-to-disable-wordpress-cron-jobs-initiated-by-wp-cron-php-use-cpanel-cron-job-instead/

    This method is strange

    cd /home/username/public_html/crunchify; php -q wp-cron.php

    they will cd to directory and then use php instead of full path? mostly I will see the full path recommended like:

    https://stackoverflow.com/questions/25145836/allow-server-to-run-cron-jobs-but-block-access-to-normal-user-with-htacess

    */10 * * * * /usr/bin/php /somewhere/www/cronjob.php
    #4600
    Marilyn
    Guest

    And other trend is telling people to use wget method:

    How to Disable wp-cron in WordPress (and Use a Real Cron Job Instead)

    wget -q -O - https://yoursite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

    How To: Run WP-Cron manually, or more often naturally

    wget -q -O - https://yoursite.com/wp-cron.php?doing_wp_cron

    What is this “?doing_wp_cron” added to the URLs
    This is added to the URLs to make sure WP Cron is actually ran, and check if there are any pending tasks.

    By default, WP Cron is actually ran for every request to WordPress. However, this check can be disabled. This is why ?doing_wp_cron is sometimes added by plugins or WordPress itself as well.

    #4601
    Bobby
    Guest

    sorry what are these for, should I be doing this on my site

    #4603
    Douglas
    Guest

    I don’t know why so many blogs and web hosts recommend wget method, maybe for shared hosting and they cannot access the PHP absolute path?

    #4825
    Raymond
    Guest

    yes probably because of shared hosting.

    #25526
    Bobby
    Guest

    WP-CLI is best, by a long shot.

    #25532
    James
    Guest

    WP-CLI is best, by a long shot.

    SlickStack changed to using WP-CLI to manage WP-Cron a few months ago, and after that change, we blocked access to /wp-cron.php in Nginx config for better security.

    #27952
    Eugene
    Guest

    for Multisite networks, WP-CLI is really the only reliable method

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Best method for server-managed WP-cron job? wget or others


Thanks to our generous sponsors for their support!