HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   ISPConfig cronjob not working why? (http://www.howtoforge.com/forums/showthread.php?t=51562)

ph-tvs 21st February 2011 21:46

ISPConfig cronjob not working why?
 
Hi,

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

this is the code that I put in the cronjob :

sh /var/www/mydomain.nl/web/sat/getimage.sh

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:
/var/www/scripts.ph-tvs.nl/web/sat/getimage.sh
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!



Theo

falko 22nd February 2011 15:16

ISPConfig 2 or 3?

ph-tvs 22nd February 2011 16:03

ISPConfig version 3

Im sorry for posting this in the wrong forum

till 22nd February 2011 17:29

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/mydomain.nl/web/sat/getimage.sh

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

/var/www/mydomain.nl/web/sat/getimage.sh


All times are GMT +2. The time now is 13:39.

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