running a job on the 2nd Sunday of each month?

Patrick Fleming EA plug-discuss@lists.plug.phoenix.az.us
Tue, 4 Mar 2003 20:24:51 -0700 (MST)


On Tue, 4 Mar 2003, Scott wrote:

> 
> nah - just change that last * to a 0.  The 5th field is for the day of the 
> week and 0 is Sunday.  You would end up with a crontab line that looks 
> something like this:
> 
> 0 4 8-14 * 0 /path/to/script <any parameters that may be needed>

This is actually what I was going to write originally. But, according to 
man crontab this will run on the 8th through the 14th *and* every Sunday 
which is why I wrote date checking as the beginning of the script. I have 
not run this schedule myself so I am trusting the man pages to be right.

> 
> What Patrick wrote stands - except now cron is checking the day of the 
> week for you.  If its not somewhere between the 8th and the 14th and its 
> not a Sunday, the job wont run.
> 
> scott
> 
> 
> On Tue, 4 Mar 2003, Patrick Fleming EA wrote:
> 
> > 
> > man 5 crontab:
> > 0 4 8-14 * * (user) run-parts script
> > Minute, Hour, Day of month, Month, Day of Week
> > Make the first line of the script check for day of the week and exit if 
> > it's not Sunday. This crontab will only run on the 8th through the 14 
> > which should be the only days a second day of the month could fall.
> > 
> > On Tue, 4 Mar 2003, Scott H wrote:
> > 
> > > I can't figure out how to run a cron job on the
> > > 2nd Sunday of every month, at 4am.  What would
> > > that line look like?  Or is this not possible?
> > > 
> > > Thanks,
> > > 
> > > Scott
> > > 
> > > __________________________________________________
> > > Do you Yahoo!?
> > > Yahoo! Tax Center - forms, calculators, tips, more
> > > http://taxes.yahoo.com/
> > > ---------------------------------------------------
> > > PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> > > To subscribe, unsubscribe, or to change  you mail settings:
> > > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> > > 
> > 
> > 
> 
> 

-- 
Patrick Fleming, EA
Licensed to represent taxpayers
before Exam, Appeals, and Conference 
divisions of the IRS