Server Administration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesServer Administration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old February 6th, 2004, 03:12 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
cron help

can someone please tell me what is the correct way to run a script every 1 hour?

* 1 * * * *
or
0 1 * * * *

Reply With Quote
  #2  
Old February 6th, 2004, 03:32 PM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
RE: cron help

Neither one, use: 0 * * * *

* 1 * * * means run every minute of the first hour of every day of every month

0 1 * * * means run at 1:00 am on every day of every month

Reply With Quote
  #3  
Old February 6th, 2004, 03:40 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: cron help

honcho, should there not be 6 values and not 5?

Reply With Quote
  #4  
Old February 6th, 2004, 03:44 PM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 4
RE: cron help

Its only 5:

minute
hour
day
month
weekday

Reply With Quote
  #5  
Old February 6th, 2004, 03:47 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: cron help

sorry, didnt know what i was thinking. so what would the values look like to run a script at 8am everyday? This is wrong is it not? 0 8 * * *

Reply With Quote
  #6  
Old February 6th, 2004, 03:53 PM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 4
RE: cron help

just do * 8 * * *

Reply With Quote
  #7  
Old February 6th, 2004, 03:54 PM
nazly nazly is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Colombo,SriLanka
Posts: 1,325 nazly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 18 sec
Reputation Power: 3
Send a message via Yahoo to nazly
RE: cron help

minute hour day month weekday <commandtorun>

minute 0-59
hour 0-23
day of month 0-31
month 0-12 (or names, see below)
day of week 0-7 (0 or 7 is Sun, or use names)

To run a script every one hour

0 0-23 * * * <command>

Should do the job 4 u..

Reply With Quote
  #8  
Old February 6th, 2004, 04:00 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: cron help

thanks for all the help but I'm getting kind of confused. Just to clarify, what is the best way to run a script at 8am?

0 8 * * *

or

* 8 * * *

Reply With Quote
  #9  
Old February 6th, 2004, 04:05 PM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 4
RE: cron help

My bad dude:

Its 0 8 * * *
Will run it at 8 am....honcho and nazly are right.

Reply With Quote
  #10  
Old February 6th, 2004, 04:08 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: cron help

hey it happens, one last question for you all. are the below values the same? i guess what i'm asking is will the do the same thing or is there a dif?


*/20 7-23 * * *

20 7-23 * * *

Reply With Quote
  #11  
Old February 6th, 2004, 04:09 PM
nazly nazly is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Colombo,SriLanka
Posts: 1,325 nazly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 18 sec
Reputation Power: 3
Send a message via Yahoo to nazly
RE: cron help

0 8 * * *
Will run the script at 8th hour 0th minute everyday everymonth alldayoftheweek
Simply will run at 08:00
So you have to use it in this manner

* 8 * * *
Will run the script at 8th hour everyminute everyday everymonth alldayoftheweek
Simply will run at 08:00, 08:01, 08:02,......, 08:58, 08:59 daily

I hope that makes sense

Reply With Quote
  #12  
Old February 6th, 2004, 04:18 PM
nazly nazly is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Colombo,SriLanka
Posts: 1,325 nazly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 18 sec
Reputation Power: 3
Send a message via Yahoo to nazly
RE: cron help

Quote:
hey it happens, one last question for you all. are the below values the same? i guess what i'm asking is will the do the same thing or is there a dif?


*/20 7-23 * * *

20 7-23 * * *


They are different..

*/20 7-23 * * *
Will run the script at each 0th,20th,40th minute of the hours 7-23
eg: 07:00, 07:20, 07:40, 08:00, 08:20, 08:40,......, 23:00, 23:20, 23:40

20 7-23 * * *
Will run the script at each 20th minute of the hours 7-23
eg: 07:20, 08:20,...., 23:20

I hope I'm correct

Reply With Quote
  #13  
Old February 6th, 2004, 04:19 PM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 4
RE: cron help

no, I think that */20 will run it every 20 minutes and just 20 will run it on the 20th minute of the hour.

Reply With Quote
  #14  
Old February 6th, 2004, 04:24 PM
nazly nazly is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Colombo,SriLanka
Posts: 1,325 nazly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 18 sec
Reputation Power: 3
Send a message via Yahoo to nazly
RE: cron help

Quote:
no, I think that */20 will run it every 20 minutes and just 20 will run it on the 20th minute of the hour.

*/20 mean every 20th minute of the hour.. So that will be 0th minute, 20th minute, 40th minute

Correct me if I'm wrong..

Reply With Quote
  #15  
Old February 6th, 2004, 04:32 PM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 4
RE: cron help

No your right.....Thats what I meant though....

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesServer Administration > cron help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |