The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM
Home Forums Register Rules & FAQ Members List Arcade Search Today's Posts Mark Forums Read


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.


Other UNIX.COM Threads You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How do I set my date in a unix script to 'new month Agent704 UNIX for Dummies Questions & Answers 1 01-27-2008 09:58 AM
problem in script involving month arithmetic rajarp UNIX for Dummies Questions & Answers 6 01-02-2008 08:25 AM
Check if a day eg: saturday is the Last saturday of the month! jobbyjoseph Shell Programming and Scripting 9 12-21-2006 11:28 PM
Execute a script on 4 week of the month tbdo88 Shell Programming and Scripting 1 09-30-2006 09:08 AM
Script for tar and zip based on month & year tuxfello Shell Programming and Scripting 1 09-07-2006 08:52 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-06-2008
Registered User
 

Join Date: Feb 2008
Posts: 1
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
How to scedule a script to be run on every second saturday in Month?

Hello Friends,

In my project I have to schedule a script to be run on every second saturday (once in month). Can you please suggest what entry should I make in cron ?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-06-2008
Registered User
 

Join Date: Sep 2006
Location: Mysore, India
Posts: 137
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
You may get some help here
Reply With Quote
  #3 (permalink)  
Old 05-06-2008
Dave Miller's Avatar
Registered User
 

Join Date: Dec 2007
Location: Northern NJ, USA
Posts: 136
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
cron combines days with dates, using or logic rather than and.

The short answer is this: Have it run every Saturday, then have your script check if the date is 8-14.
Reply With Quote
  #4 (permalink)  
Old 05-08-2008
Registered User
 

Join Date: Feb 2007
Location: Pune, Dehradun (INDIA), Michigan(US)
Posts: 187
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Quote:
Originally Posted by sourabhsharma View Post
Hello Friends,

In my project I have to schedule a script to be run on every second saturday (once in month). Can you please suggest what entry should I make in cron ?
Hey,

It depends that on which date "Second Saturday" comes in a particular month.
Make a cron job entry with following parameters :
00 23 ? * 6

This is at 00 minutes of hour 23 on Saturday Every Month execute the script. But ? denotes "Which Day of the Month" : this varies and as I said earlier "It depends that on which date 'Second Saturday' comes in a particular month."
Either you program it OR Fix the day of the month as 14th day of the month.

Then cron entry will be :
00 23 14 * 6


Hope you got what I am trying to convey.
Thanks.
Varun
Reply With Quote
  #5 (permalink)  
Old 05-08-2008
Registered User
 

Join Date: May 2008
Location: Northern Ireland
Posts: 12
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
00 23 8-14 * 6

Rgds
zx
Reply With Quote
Google UNIX.COM
Reply



Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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



All times are GMT -7. The time now is 09:11 PM.


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

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102