ISPConfig cronjob not working why?

Discussion in 'Installation/Configuration' started by ph-tvs, Feb 21, 2011.

  1. ph-tvs

    ph-tvs New Member


    I have a problem to get a cronjob working within ISPConfig.

    this is the code that I put in the cronjob :

    sh /var/www/

    But the cronjob isnt doing anything.

    When I log into the server by putty (ssh) and typing that exactly command, it works fine.

    Also tried to remove the sh from the line so that the code is:
    it is not working.

    I know that cronjobs are working in ISPConfig because I have another cronbjob in ISPConfig that is working fine. But that is an url cronjob.
    http://www.mywebsite/cron.php <- working fine.
    Client has full cron in the client options menu.

    Can someone please explain to me why it isnt working in ISPConfig and why it is working fine by ssh?

    The cron log file contains no of errors for this cronjob.

    Thanks in advance!

  2. falko

    falko Super Moderator ISPConfig Developer

    ISPConfig 2 or 3?
  3. ph-tvs

    ph-tvs New Member

    ISPConfig version 3

    Im sorry for posting this in the wrong forum
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    In Linux cronjobs, every command has to be called with its full path as cron does not read the $PATH variable that is sued on the shell. So instead of sh, you have to use

    /bin/sh /var/www/

    or if the file contains already #!/bin/sh in the first line, then use just:

  5. Mex

    Mex New Member

    I have to set vtiger cronjob, so I set ISPconfig cronjobs:
    * * * * * /bin/sh [web_root]/crm/cron/
    and checked on active and log outup checkbox and saved. is executable file with permissions 755
    chmod a+x
    but it doesn't work! It works only by shell

Share This Page