running a job on the 2nd Sunday of each month?
Scott
plug-discuss@lists.plug.phoenix.az.us
Tue, 4 Mar 2003 20:00:05 -0700 (MST)
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>
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
> >
>
>
--
NT makes anything simple, easy, and anything difficult to do, impossible.
Unix makes anything easy to do difficult, and anything difficult to do,
possible. Basically, if your VCR is still flashing "12:00" then unix is not
for you!