Cron job not working

Discussion in 'General' started by Hoox, Jan 23, 2013.

  1. Hoox

    Hoox New Member

    I need to setup a cron job from a php file. This is the line I need to run (from documentation): php /var/www/clients/client3/web24/web/cron.php >/dev/null 2>&1

    I have set Client limit to chrooted cron in ISPConfig.

    I tried manually editing the cron file to /usr/bin/php /var/www/clients/client3/web24/web/cron.php >/dev/null 2>&1.
    Also tried with both full path and /web/cron.php >/dev/null 2>&1.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    First, a cronjob (does not matter if you use ispconfig) has always to contain full paths, so it always have to start with "/usr/bin/php", so you have to enter in ISPConfig:

    /usr/bin/php /var/www/clients/client3/web24/web/cron.php

    To use the php binary (which is outside of the web root), you have to ensure that you create it as full cron and not jailed cron.

    But my recommendation is something else, as the cron.php file is in the web directory, the easiest and secure way to set this up is a url cron. For a url cron, you just put the url to this script in the cron command line in ispconfig. e.g.:


    and ispconfig will create a cronjon that calls this url.

Share This Page