Wordpress cron on ISPconfig | Debian 10, PHP 7.3.9

Discussion in 'Installation/Configuration' started by inside83, Oct 2, 2019.

Tags:
  1. inside83

    inside83 Member

    Hi,
    I'm having issues with setting up a cron for Wordpress sites in ISPConfig.

    I used to put:
    '-q -O - https://domain.com/wp-cron.php?doing_wp_cron &>/dev/null'
    in 'Command to run (commands are executed via sh, urls via wget)' under Sites > Cron Jobs but several sites on several ISPConfig servers reported that scheduled events didn't run so I deactivated it and uncommented 'define('DISABLE_WP_CRON', true);' and those reports are gone now.

    What is a proper way to set up a cron job for Wordpress in ISPConfig?
    Is there a difference if I use different PHP versions on different sites?
    Should I use 'cd /var/www/clients/clientX/webX/web; /usr/bin/php -q wp-cron.php' instead of '-q -O - https://domain.com/wp-cron.php?doing_wp_cron &>/dev/null'?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You entered a wrong command into the cron field, the correct command is:

    Code:
    https://domain.com/wp-cron.php?doing_wp_cron
     
  3. inside83

    inside83 Member

    Without
    Code:
    -q -O - 
    and
    Code:
    &>/dev/null
    ?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes. Otherwise, it won't be a URL. So what you entered must fail. Just enter it exactly as I showed you in post #2.
     
  5. inside83

    inside83 Member

    Got it, thank you.

    Just one more thing: Is it ok if I set several WordPress cron's to fire up at the same time.
    Eg
    Code:
    */5    *    *    *    *    'https://domainX.com/wp-cron.php?doing_wp_cron'
    */5    *    *    *    *    'https://domainY.com/wp-cron.php?doing_wp_cron'
    */5    *    *    *    *    'https://domainZ.com/wp-cron.php?doing_wp_cron'
    
    or is it more advisable to do:
    Code:
    */5    *    *    *    *    'https://domainX.com/wp-cron.php?doing_wp_cron'
    */6    *    *    *    *    'https://domainY.com/wp-cron.php?doing_wp_cron'
    */7    *    *    *    *    'https://domainZ.com/wp-cron.php?doing_wp_cron'
    
    ?
     

Share This Page