Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google site



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

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-30-2007
Registered User
 

Join Date: Jul 2006
Posts: 145
executing a cron

Hi Gurus

I have a requirement to execute a cron job every 30 min until 8pm in the night and again start at 8 am in the morning. How would I add the cron entry for this requirements. all inputs are appreciated.

Thanks in advance
Sponsored Links
  #2 (permalink)  
Old 03-30-2007
Registered User
 

Join Date: Feb 2007
Location: Bangalore
Posts: 105
Quote:
Originally Posted by ragha81
Hi Gurus

I have a requirement to execute a cron job every 30 min until 8pm in the night and again start at 8 am in the morning. How would I add the cron entry for this requirements. all inputs are appreciated.

Thanks in advance
I think basically the job should every 30mins from 8AM-8PM...May be one way of doing is ...

30 08-20 * * * your job > log path
  #3 (permalink)  
Old 03-30-2007
Technorati Master
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 3,007
OP had mentioned every 30 mins

so this command would run for

9 30
10 30

isnt that ?
  #4 (permalink)  
Old 03-30-2007
Registered User
 

Join Date: Feb 2007
Location: Bangalore
Posts: 105
Quote:
Originally Posted by matrixmadhan
OP had mentioned every 30 mins

so this command would run for

9 30
10 30

isnt that ?
even i was thinking may be like

30 08,09,10,11,12,13,14,15,16,17,18,19,20 * * * <job to be executed>

lets see what gurus thinkg here.....
  #5 (permalink)  
Old 03-30-2007
Technorati Master
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 3,007
it should be something like


Code:
30,60 08-20 * * * your job > log path

  #6 (permalink)  
Old 03-30-2007
Registered User
 

Join Date: Feb 2007
Location: Bangalore
Posts: 105
Quote:
Originally Posted by matrixmadhan
it should be something like


Code:
30,60 08-20 * * * your job > log path


Oops!!! May be your command might work for him...Thanks for the correction.....
  #7 (permalink)  
Old 03-30-2007
Registered User
 

Join Date: Jul 2006
Posts: 145
thanks guys. I have just implemented the cron. Will let you know if it works.. thanks
Sponsored Links
Closed Thread

Bookmarks

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
cron job starts new cron proccess ron76 Solaris 3 05-12-2008 02:07 AM
AIX and cron logs filtering ?: /etc/cronlog.conf, /var/adm/cron/log Keith Johnson AIX 0 01-09-2008 08:32 PM
executing script by cron doesnt give me expected result anchal_khare UNIX for Advanced & Expert Users 1 09-12-2007 09:07 AM
executing shell script from the cron abNORMal HP-UX 2 06-15-2006 03:54 PM
Cron : you are not authorized to use cron. Sorry. tt155 UNIX for Advanced & Expert Users 1 07-06-2005 11:37 AM



All times are GMT -4. The time now is 03:48 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0