#1  
Old 10th January 2010, 18:38
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
Default Cron in ISPCONFIG3

I have a script that needs to be run daily. Should I use the Cron Job page in ISPCONFIG to do this, or do I need to add it manually on the server, or both?

In order to test it, I added the following in ISPCONFIG (running at min intervals for testing purpose) :
Code:
*/5
*
*
*
*
wget -q http://www.mydomain.com/cron.php
Another question...should ISPCONFIG create a new file in /etc/cron.d for this new entry? I have seen that it does during other tests, but for some reason, it is no longer creating this file.

I do not see any new entries in /var/log/ispconfig/cron.log, nor anywhere else, but I do see new entries in syslog. For example in syslog:
Code:
Jan 10 10:30:01 server2 /USR/SBIN/CRON[9529]: (web3) CMD (/var/www/clients/client1/web3wget -q http://www.mydomain.com/cron.php)
With the particular script that is running (...cron.php), it should be generating a log file that I have created, but it is not, despite the appearance that it is being logged in syslog.

Any insight?

Thanks!
Reply With Quote
Sponsored Links
  #2  
Old 10th January 2010, 18:41
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
Default

Update:
I now see that a file has been created in /etc/cron.d:
Code:
MAILTO=''

SHELL='/usr/sbin/jk_chrootsh'

*/5	*	*	*	*	web3	/var/www/clients/client1/web3wget -q http://www.mydomain.com/cron.php
Does this look correct?

Forgot to mention that the cron job still isn't being executed. And I have also tried:
Code:
*/5	*	*	*	*	web3    /usr/bin/php /var/www/clients/client1/web3/web/cron.php

Last edited by ctroyp; 10th January 2010 at 21:53.
Reply With Quote
  #3  
Old 11th January 2010, 12:45
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,504
Thanks: 813
Thanked 5,266 Times in 4,129 Posts
Default

You have to use the full path to commands in cronjobs, as cron does not use the $PATH variable. So the correct command will be something like:

/usr/bin/wget -q http://www.mydomain.com/cron.php
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
yoplait (11th January 2010)
  #4  
Old 11th January 2010, 13:21
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
Default

Changed to full path, but still, it is not running.
Reply With Quote
  #5  
Old 11th January 2010, 13:37
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,504
Thanks: 813
Thanked 5,266 Times in 4,129 Posts
Default

Ok. And how does the crontab looks now? Any errors in the syslog or messages log?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 11th January 2010, 16:16
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
Default

I do know that the syslog look to be giving the same entries (with the /usr/bin/wget this time), but I have not looked at the messages log. I don't have access to the system right now, but I'll take a look as soon as I get back...thanks for the help thus far!

Last edited by ctroyp; 11th January 2010 at 16:40. Reason: wget
Reply With Quote
  #7  
Old 12th January 2010, 03:30
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
Default

No errors or relevant entries in messages or syslog.
Reply With Quote
  #8  
Old 12th January 2010, 04:21
BorderAmigos BorderAmigos is offline
Senior Member
 
Join Date: Apr 2008
Location: San Diego & Tijuana
Posts: 302
Thanks: 26
Thanked 33 Times in 31 Posts
Send a message via MSN to BorderAmigos Send a message via Yahoo to BorderAmigos
Default

A side note.... Webmin peacefully coexists with ISPConfig, both can be installed. I set my other cron jobs up in Webmin.
__________________
System6Hosting.com, ISPConfig 3, Debian.
Reply With Quote
  #9  
Old 13th January 2010, 03:50
ctroyp ctroyp is offline
Senior Member
 
Join Date: Sep 2005
Posts: 292
Thanks: 3
Thanked 2 Times in 1 Post
Default

I need o get this working with the standard method via ISPConfig. Any other thoughts till?
Reply With Quote
  #10  
Old 13th January 2010, 09:07
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,504
Thanks: 813
Thanked 5,266 Times in 4,129 Posts
 
Default

The cron entrys in the crontab files are fine, so ispconfig is working correctly here as this is all ispconfig has to do, the execution of the cronjob is a question of the operating system. have you tried to restart the cron daemon?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig3 Integration into other systems CaptnCrash General 6 3rd June 2010 08:16
ISPConfig3 FTP problem karazy-k Server Operation 6 3rd September 2009 16:03
ISPConfig cron jobs mphayesuk General 3 30th August 2009 11:15
Questions about ISPConfig3 vs. ISPConfig2 atjensen11 General 1 14th March 2009 23:59
user deleted but user cron still running bas1968 General 1 13th February 2009 11:59


All times are GMT +2. The time now is 14:35.


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