CRON job not running

Discussion in 'ISPConfig 3 Priority Support' started by NeonTigerUK, Apr 10, 2018.

  1. NeonTigerUK

    NeonTigerUK Member HowtoForge Supporter

    Hi All

    I have a CRON job set up for one site, which is not firing when it it scheduled to run, it has log output enabled, and the log file in the site’s /private folder is empty.

    If I run the command line exactly as it is in the CRON command on the server it works absolutely fine.

    Here’s the script

    /usr/bin/php7.2 /var/www/clients/clientXX/webXXX/web/wp-content/plugins/akeebabackupwp/app/cli/backup.php

    Script it scheduled to run a 01:16 every day
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Last edited: Apr 10, 2018
  3. NeonTigerUK

    NeonTigerUK Member HowtoForge Supporter

    HI @till

    I’m not sure that I understand ... aas weller?

    I will create another CRON job for *:35 changing the URL to the site, and see if it fires correctly
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Sorry, the autocorrection messed it up a bit. I meant "as well".
     
  5. NeonTigerUK

    NeonTigerUK Member HowtoForge Supporter

    I’ve created the CRON job in ISPC, not sure if that’s jailed to be honest the server is a remote server to the Master (I’m running Multiserver)

    Changing to https://domain.tld etc hasnt helped
     
    Last edited: Apr 10, 2018
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Please enter the https URL in the address bar of your browser an open it, does it run then? And just to be sure, the cron command should be just the https URL, do not add /usr/bin/php7.2 in front.
     
  7. NeonTigerUK

    NeonTigerUK Member HowtoForge Supporter

    No it doesnt, but its not supposed to, here’s the section from the instructions ...

    Use the following command in your host's CRON interface: /path/to/php /var/www/clients/clientXX/webXXX/web/wp-content/plugins/akeebabackupwp/app/cli/backup.php

    Important Remember to substitute /path/to/php with the real path to your host's PHP CLI (Command Line Interface) executable. Do remember that you must use the PHP CLI executable; even though the PHP CGI (Common Gateway Interface) executable may work with our CRON scripts it is prone to timeout errors and backup failures. If you are not sure what this means, please consult your host. They are the only people who can provide you with the path to the PHP CLI executable file.
     
  8. NeonTigerUK

    NeonTigerUK Member HowtoForge Supporter

    Checking the ISPConfig/cron table on the server in question - yes the CRON job is chrooted - I’ve tried to run one of the other commands availble wget and curl variants, also but these also fail

    (Obviously the wget and curl don’t have the php path)

    Any thoughts?
     
    Last edited: Apr 10, 2018
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    You have two options then when this PHP script dos not support URL cron:

    1) Set the cron type in client settings to full cron, then deletee the cronjob and recreate it as full cron.
    2) Add PHP 7 binary that you want to use into the jail with jk_cp command and then use the cron command with adjusted path:

    /path/to/php /web/wp-content/plugins/akeebabackupwp/app/cli/backup.php

    as the jailroot is the web root.
     

Share This Page