ISPConfig 3 cron

Discussion in 'ISPConfig 3 Priority Support' started by keshwarsingh, Jul 18, 2013.

Thread Status:
Not open for further replies.
  1. keshwarsingh

    keshwarsingh HowtoForge Supporter


    Trying to setup a cron job from the panel & it seems to create the cron within a chroot environment though no jailkit was installed..


    */2 * * * * web3 /var/www/clients/client2/web3/php -q /var/www/clients/client2/web3/web/tiger/cron.php

    If i create a shell user & set the cron job using crontab -e, everything works fine..

    */2 * * * * php -q /var/www/clients/client2/web3/web/tiger/cron.php

    Is there a way to prevent the panel from creating a cron job within a chrooted environment ?
  2. till

    till Super Moderator

    There is a bug in the current version when a cronjob is created as admin which is fixed in svn stable branch already.


    Create the cronjob as client (us ethe login as function to become the client if you are logged in as admin) and ensure that max cronjob in client limits is set to full.
  3. keshwarsingh

    keshwarsingh HowtoForge Supporter

    The max cronjob in client limits has been set to full.

    When i log in as client, i cannot see the cron jobs.
  4. keshwarsingh

    keshwarsingh HowtoForge Supporter

    Max. number of cron jobs -1 has been set.
  5. keshwarsingh

    keshwarsingh HowtoForge Supporter

    The cron job is still as follows:

    */5 * * * * web4 /var/www/clients/client1/web4/php -f .....
  6. till

    till Super Moderator

    I've tested it here and the cronjobs show up correctly in the client menu when "Max. number of cron jobs" is set to -1. I've tested it in ISPConfig with default theme.
  7. till

    till Super Moderator

    You entered the command in a wrong way, on Linux systems, all commands have to use full paths as the PATH variable is not available when the cronjob is executed. So when you want tp call a script by using the php interpreter, then you have to enter the command as:

    /usr/bin/php -f ....

    in the command field.
  8. keshwarsingh

    keshwarsingh HowtoForge Supporter

    Till i fully agree with you.. The max number of cron jobs is set to -1 with the full as limits..

    When i login as client, i can succesfully create the cron job.

    But the cron is still created in a chrooted environment..
  9. keshwarsingh

    keshwarsingh HowtoForge Supporter

    Ok i just tried the following as command..

    /usr/bin/php -f .....

    The cron job is created, but when i login via ssh & sniff the content of /etc/cron.d/ , the content is as follows...

    */5 * * * * web4 /var/www/clients/client1/web4/usr/bin/php -f .....

    Why is it putting the home path before the command /usr/bin/php -f ? seems to be chrooted ..
  10. till

    till Super Moderator

    Did you change the php path like I explained above?
  11. keshwarsingh

    keshwarsingh HowtoForge Supporter

    Yes i did!

    ISPConfig is automatically adding the users' home path before the command to be executed.

    For e.g if you want to run /usr/bin/php -f blah blah blah in classic mode each 5 mins (installing through crontab -e), it works just fine.

    If you login wether as admin or the client & install the same cron job, it automatically adds the users home directory before the command /usr/bin/php -f..
  12. till

    till Super Moderator

    Works fine here in ISPConfig, just verified it. I logged in as client (the client has set max allowed cronjob typs to fullcron) and added a cronjob with the following input in the command field:

    /usr/bin/php -f /tmp/hallo.php
    and the resulting cronjob is:

    10      10      *       *       *       web17   /usr/bin/php -f /tmp/hallo.php
  13. keshwarsingh

    keshwarsingh HowtoForge Supporter

    It now works.

    For some unknown reasons, the cron was still in the "Show Jobqueue"
Thread Status:
Not open for further replies.

Share This Page