#1  
Old 27th October 2010, 21:23
marcoslavorato marcoslavorato is offline
Junior Member
 
Join Date: Oct 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Wink Cron does not work

Hello all. I have a problem configuring the crontab on my server. I follow this steps.

1. Edit using nano crontab -e command
2. Add this lines
Code:

Code:
0 24 * * * php /root/scripts/backup_mysql.php
15 * * * * wget -q -O /dev/null http://domain.com/cronjob/atualiza-horas
3. Save the file and run the /sbin/service crond start command

This both cronjobs does not execute. How can I make this work? The second cronjob is without the link.
Reply With Quote
Sponsored Links
  #2  
Old 27th October 2010, 21:28
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,458
Thanks: 813
Thanked 5,240 Times in 4,108 Posts
Default

You have to use the full path to applications in cronjobs. E.g. /usr/bin/php and not just php
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 27th October 2010, 21:30
marcoslavorato marcoslavorato is offline
Junior Member
 
Join Date: Oct 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
You have to use the full path to applications in cronjobs. E.g. /usr/bin/php and not just php
Thanks till. And the second command, do you know why does not work?
Reply With Quote
  #4  
Old 27th October 2010, 22:25
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,458
Thanks: 813
Thanked 5,240 Times in 4,108 Posts
Default

Same reason. You have to use the full path for every command that you use in a cronjob. If you dont know the full path, then you can get it with the which command. e.g.

which wget
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 27th October 2010, 23:44
marcoslavorato marcoslavorato is offline
Junior Member
 
Join Date: Oct 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

till, thanks again but it still no working. Look how is my cron file. I tried in the log but I can't found anything.

Code:
0 24 * * * /usr/bin/php "/root/scripts/backup_mysql.php"
15 * * * * /usr/bin/wget -q -O /dev/null http://domain.com/cronjob/atualiza-horas
Quote:
Originally Posted by till View Post
Same reason. You have to use the full path for every command that you use in a cronjob. If you dont know the full path, then you can get it with the which command. e.g.

which wget
Reply With Quote
  #6  
Old 28th October 2010, 00:41
marcoslavorato marcoslavorato is offline
Junior Member
 
Join Date: Oct 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Thanks till, working fine, now.
Reply With Quote
Reply

Bookmarks

Tags
cron

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
Problem getting cron job to run and in need of help :) MrCompTech General 7 27th July 2010 09:50
Mail server using Postfix, Dovecot, Mysql... Postfix virtual maps doesn't work?? tarasbuljba HOWTO-Related Questions 33 28th May 2010 14:33
Why the cron deamon doesn't work? vaio1 Installation/Configuration 4 19th March 2010 10:01
Remoting frame work work with version 2.32 ??? afandino Developers' Forum 7 8th June 2009 16:23
install ispconfig2 ok site dos not work ferasfm Installation/Configuration 5 7th May 2009 20:16


All times are GMT +2. The time now is 08:55.


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