[ale] crontab

JK jknapka at kneuro.net
Thu Apr 23 13:40:15 EDT 2009


This crontab line should do it:

  # Min Hour Date Month  DoW  Cmd
    0   0    1-7  1-12   Thu  myCommand

It says, run every month on Thursdays, but only during the first
seven days of the month. There's only one Thursday per month that
matches all those criteria. (I may have the order of fields mixed
up.)

-- Joe


Chris Fowler wrote:
> I want to execute a script at 6pm on the first Thursday of each month.
> Is there a trick in crontab I can do?
> 
> Here are the fields allowed
> 
>               field          allowed values
>               -----          --------------
>               minute         0-59
>               hour           0-23
>               day of month   1-31
>               month          1-12 (or names, see below)
>               day of week    0-7 (0 or 7 is Sun, or use names)
> 
> The only thing I can think of off the top of my head is to run it every
> Thursday and then check to see if we are the first Thursday of the
> month. If not, exit 0.
> 
> 
> 
> 
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> 
> 


-- 
A closed mouth gathers no feet.


More information about the Ale mailing list