Cron Job not working

Discussion in 'General' started by asn, Sep 13, 2011.

  1. asn

    asn New Member

    Sir, my cron job is not working.

    When I check in ISPConfig monitor tab
    Under monitor tab - ISPConfig Cron - Log, I see following output

    mkdir: cannot create directory `/var/www/clients/client1/web1/var': File exists
    mkdir: cannot create directory `/var/www/clients/client1/web1/var/run': File exists
    mkdir: cannot create directory `/var/www/clients/client1/web1/var/run/mysqld': File exists
    ln: creating hard link `/var/www/clients/client1/web1/var/run/mysqld/mysqld.sock': File exists
    invalid shell, /var/www/clients/client1/web1/bin/bash does not exist
    usermod: no changes

    Why this problem comes. Please help me.

    Thanks & Regards
    ASN
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the settings of your cronjob and the command that you execute.
     
  3. asn

    asn New Member

    Cron Job Command

    Thank you for replay

    In site cron job settings

    Minute - *
    Hours - *
    Days of month - *
    Months - *
    Days of week - *
    Command to run - /usr/bin/php -f /var/www/clients/client1/web1/web/admin/cron/cron.php

    Thanks & Regards
    ASN
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    According to the above errors, you created a jailed cronjob. But the php binary is not in the jail, so the cronjob can not work.

    As the cronjob is a php script, you should use a url cronjob instead. Enter as command the url to the php script, e.g.:

    http://www.yourdomain.tld/admin/cron/cron.php
     
  5. asn

    asn New Member

    Cron Job working

    Thank you very much for your reply.

    My cron job working.

    Thanks & Regards
    ASN
     
  6. scolak

    scolak New Member

    @till if you don't mind me asking, I have a similar problem as @asn, i have user chrooted to the clients/client1/web1 as home directory, in /var/www/clients/client1/web1/web/ i have crontest.php script.
    As a root i can execute it, but as user web1 i cannot through cli and through cronjob (both using wget and /usr/bin/php)
    Can you direct me to some possible solution.
    thanks
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Probably you don't have PHP installed within the jail. You can use the jp_cp command from jailkit to install additional programs into the jail. example:

    jk_cp -j /var/www/clients/client1/web1 /usr/bin/php

    there might be other dependencies required by PHP that need to be copied as well. There must be a thread about adding PHP to the jail here in the forum somewehere.
     

Share This Page