The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
execution without ./ mehmetned Shell Programming and Scripting 7 02-10-2007 04:49 PM
execution without using (./) mehmetned UNIX for Dummies Questions & Answers 2 02-09-2007 06:28 AM
last execution time cubs0729 UNIX for Dummies Questions & Answers 1 01-20-2006 04:45 PM
execution time ramki_rk High Level Programming 2 08-27-2003 06:23 AM
Jar App (GUI) Execution Breen Shell Programming and Scripting 1 01-23-2002 04:06 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-14-2008
Registered User
 

Join Date: Mar 2008
Posts: 27
crontab execution

is it possible to soecify time overnight in 5 days for example:

0 18-7 * * 1-5 /mycode

is this okay to use 18-7 because im not getting the results correctly?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-14-2008
Dave Miller's Avatar
Registered User
 

Join Date: Dec 2007
Location: Northern NJ, USA
Posts: 142
Try this instead:

0 0-7,18-23 * * 1-5 /mycode
Reply With Quote
  #3 (permalink)  
Old 05-14-2008
Dave Miller's Avatar
Registered User
 

Join Date: Dec 2007
Location: Northern NJ, USA
Posts: 142
Then again, what are you trying to do?

My solution does morning and evening of each weekday.

My solution may not be what you really want.

You may need to split it into 3 lines. 1 for Monday evening, 1 for Tuesday thru Friday, morning and evening, and 1 for Saturday morning.

I.E.:

0 18-23 * * 1 /mycode # Monday Evening
0 0-7,18-23 * * 2-5 /mycode # Tue thru Fri, Morning & Evening
0 0-7 * * 6 /mycode # Saturday Morning
Reply With Quote
  #4 (permalink)  
Old 05-15-2008
Registered User
 

Join Date: Mar 2008
Posts: 27
Quote:
Originally Posted by Dave Miller View Post
Then again, what are you trying to do?

My solution does morning and evening of each weekday.

My solution may not be what you really want.

You may need to split it into 3 lines. 1 for Monday evening, 1 for Tuesday thru Friday, morning and evening, and 1 for Saturday morning.

I.E.:

0 18-23 * * 1 /mycode # Monday Evening
0 0-7,18-23 * * 2-5 /mycode # Tue thru Fri, Morning & Evening
0 0-7 * * 6 /mycode # Saturday Morning
Thank you i think i will go with slpitting becase i think this was going to end Saturday Morning...
Reply With Quote
  #5 (permalink)  
Old 05-15-2008
Dave Miller's Avatar
Registered User
 

Join Date: Dec 2007
Location: Northern NJ, USA
Posts: 142
As I was driving home last night, the thought popped into my head that it only needs two lines:

0 18-23 * * 1-5 /mycode # Monday thru Friday Evening
0 0-7 * * 2-6 /mycode # Tuesday thru Saturday Morning
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:51 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0