HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   General (
-   -   Cronjob not working (

icinfo 10th August 2011 14:40

Cronjob not working
We're having ISPConf and trying to add cronjob command to the website. The cronjob does not do anything when placed to ISPCOnf but works when put directly as a command.

Definitions for times are:

Minutes: 10
all other time-definations: *

Cronjob site address in the Cronjob comman definitions: username="xxx" passwd="xxx" template_id="16"

Is it possible this problem has something to do with the ISPConf settings/configuration? Any ideas?


till 10th August 2011 15:40

Please post the exact command that you entered into the command field in the cronjob settings.

SamTzu 10th August 2011 18:51

We have tried it both ways...

Straight from the command line this works...


/usr/bin/php /var/www/clients/client3/web137/web/administrator/components/com_csvivirtuemart/helpers/cron.php username="cronjob.user137" passwd="password" template_id="16"
Also tried...

Quote: username="cronjob.user137" passwd="password" template_id="16"
Neither worked unless run straight from command line. :confused:

SamTzu 10th August 2011 18:53

This is the command we would like to run but it's rather long. :)


/usr/bin/php "/var/www/clients/client3/web137/web/administrator/components/com_csvivirtuemart/helpers/cron.php" username="cronjob.user137" passwd="password" jform:general:exportto="tofile" jform:general:localpath="/var/www/clients/client3/web137/web/media" jform:general:export_file="csv" jform:general:field_delimiter="," jform:general:category_separator="/" jform:general:include_column_headers="1" jform:general:groupby="1" jform:general:vm_itemid="11" jform:general:export_date_format="d/m/Y H:i:s" jform:general:export_price_format_decimal="2"

till 11th August 2011 10:48

It might be that the command is too long. Check the command that is stored in the cront file in /etc/cron.d if it is complete.

SamTzu 19th August 2011 10:48

I think I found the problem. (OpenVZ client)

Jail kit gives this error when I try to upgrade it.

Setting up jailkit (2.14-1) ...
insserv: warning: script 'K01jailkit' missing LSB tags and overrides
insserv: warning: script is corrupt or invalid: /etc/init.d/../rc6.d/S00vzreboot
This probably messes up the users cron.

till 19th August 2011 10:58

Thats not a problem, as insserv calculates the dependencies automatically. Beside that, the jailkit daemon part is not used in your setup, so it does not matter if it is started or not.

SamTzu 19th August 2011 11:45

I can't figure out what the problem is.
This line keeps poping up in the syslog...


Aug 19 08:24:01 shop1 /USR/SBIN/CRON[20282]: (web192) CMD (/var/www/clients/client53/web192/
Aug 19 08:24:01 shop1 /USR/SBIN/CRON[20284]: (root) CMD (/usr/local/ispconfig/server/ > /dev/null 2>> /var/log/ispconfig/cron.log)
Aug 19 08:24:01 shop1 /USR/SBIN/CRON[20279]: (CRON) error (grandchild #20282 failed with exit status 53)
Clearly the user cron job does not run.

Must be a bug somewhere. I wonder if this is also true in Debian?


cat /etc/cron.d/ispc_chrooted_web192


24 * * * * web192 /var/www/clients/client53/web192/

SamTzu 19th August 2011 12:10

And the log file reveals the reason...


PHP Warning: mkdir(): File exists in /usr/local/ispconfig/server/plugins-available/ on line 293
mkdir: cannot create directory `/var/www/clients/client53/web192/var': File exists
mkdir: cannot create directory `/var/www/clients/client53/web192/var/run': File exists
mkdir: cannot create directory `/var/www/clients/client53/web192/var/run/mysqld': File exists
ln: creating hard link `/var/www/clients/client53/web192/var/run/mysqld/mysqld.sock': File exists
invalid shell, /var/www/clients/client53/web192/bin/bash does not exist
For some reason there is no bash in the users bin folder.

till 19th August 2011 13:39

Seems as if the jail is broken or has not been fully initialized with all required files. The jail is only created once for every website when the first cronjob or shell user is created.

All times are GMT +2. The time now is 05:30.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.