CRON scheduling

How do I set CRON up to run a script on the 2nd Monday of each month (let's say at noon)?  Is this possible?
badreeceAsked:
Who is Participating?
 
bedotConnect With a Mentor Commented:
sorry for ahoff, it's possible with adding few logic in it:

0 12 8-14 * 1 script

so between 8th & 14th day of the month, only a monday: that will be always the second monday

:-)
 
0
 
ahoffmannCommented:
> Is  this possible?
Short answer: NO.

You need to write a script (or any other program) which checks if it is the 2'nd monday. Then call this script via cron each monday.
I suggest perl with the Date::Manip module for the script.
0
 
ahoffmannCommented:
great !!
didn't think of combining the day-of-month and the day-of-week field.
Seems that this pretty old software is really good :-))
0
 
badreeceAuthor Commented:
Thanks to Bedot for the answer and the quick reply.  I gladly give the 100 points.

Thanks to Ahoffmann for the quick reply and the proposed workaround as well.  Most Excellent.
0
All Courses

From novice to tech pro — start learning today.