HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   Cronjob not working (http://www.howtoforge.com/forums/showthread.php?t=53727)

icinfo 10th August 2011 13:40

Cronjob not working
 
We're having ISPConf 3.0.3.3. 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:

http://sitename.com/administrator/co...lpers/cron.php username="xxx" passwd="xxx" template_id="16"

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

Amy

till 10th August 2011 14:40

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

SamTzu 10th August 2011 17:51

We have tried it both ways...

Straight from the command line this works...

Quote:

/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:

http://www.domain.com/administrator/...lpers/cron.php username="cronjob.user137" passwd="password" template_id="16"
Neither worked unless run straight from command line. :confused:

SamTzu 10th August 2011 17:53

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

Quote:

/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 09: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 09:48

I think I found the problem. (OpenVZ client)

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

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 09: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 10:45

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

Quote:

Aug 19 08:24:01 shop1 /USR/SBIN/CRON[20282]: (web192) CMD (/var/www/clients/client53/web192/cron.sh)
Aug 19 08:24:01 shop1 /USR/SBIN/CRON[20284]: (root) CMD (/usr/local/ispconfig/server/server.sh > /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?
http://ubuntuforums.org/showthread.php?t=1760488

Quote:

cat /etc/cron.d/ispc_chrooted_web192
MAILTO=''

SHELL='/usr/sbin/jk_chrootsh'

24 * * * * web192 /var/www/clients/client53/web192/cron.sh

SamTzu 19th August 2011 11:10

And the log file reveals the reason...

Quote:

PHP Warning: mkdir(): File exists in /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php 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 12: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 12:19.

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