#1  
Old 20th October 2007, 10:25
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Unhappy Cronjobs and Loops

Hi guys,

how can I set a cronjob on the Fedora 7?

I have written the following command in the /etc/crontab file:

Code:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/


# php cronjobs

#It starts all saturday at 06:00
#* 6 * * 6 lynx -dump http://www.example.com/action.php

# The Job starts every day at 05:00.
#* 5 * * * lynx -dump http://www.example.com/action1.php

# The Job starts every saturday at 04:00
#* 4 * * 6 lynx -dump http://www.example.com/action2.php

# The Job start every saturday at 24:00.
#* 0 * * 6 lynx -dump http://www.example.com/action3.php

# The Job starts at 23:00 of each Saturday
#* 23 * * 6 lynx -dump http://www.example.com/action4.php

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
~
~
but the operations have been repeated many times.
which is the mistake?

Was I likely wrong with the time settings and the actions are repeated many times?

Thanks

Last edited by vaio1; 20th October 2007 at 10:29.
Reply With Quote
Sponsored Links
  #2  
Old 20th October 2007, 16:56
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,030
Thanks: 826
Thanked 5,381 Times in 4,228 Posts
Default

Do not edit /etc/crontab file manually.

Instead, run the command:

crontab -e

and insert the line for your cronjob.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 20th October 2007, 18:03
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default

The problem is the loop.
Maybe there is an error here:
* 6 * * 6 lynx -dump http://www.example.com/action.php

the first asterix are the minutes. To execute it only one time, have I to set this parameter to zero?

thanks
Reply With Quote
  #4  
Old 20th October 2007, 18:08
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,030
Thanks: 826
Thanked 5,381 Times in 4,228 Posts
Default

Please tell me in words, when exactly and how often shall the cronjob beeing executed?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 20th October 2007, 19:17
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default

I would like to start a php page at the saturday morning at the 6am o' clock
Reply With Quote
  #6  
Old 21st October 2007, 15:02
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

Try this:
Code:
0 6 * * 6 lynx -dump http://www.example.com/action.php
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
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


All times are GMT +2. The time now is 17:52.


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