[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Crontab a settimane alterne



> > ... 1-7 * 1 ...
> > ... 15-21 * 1 ...
> > ... 28-31 * 1 ...
> 
> In realta' quell'esecuzione avviene per piu' di 17 giorni al mese...
> Dal man crontab:
> 
> Note: The day of a command's execution can be specified by two fields --
>       day of month, and day of week.  If both fields  are restricted
>       (i.e., aren't *), the command will be run when either field
>       matches the current time.
>       For example, ``30 4 1,15 * 5'' would cause a command to be run at
>       4:30 am on the 1st and 15th of each month, plus  every  Friday.

Si potrebbe fare

mm hh 1-7,15-21,28-31 * * if [ `date +\%u` -le 1 ]; then /path/to/my/command; fi

Ciao

-- 
Sandro Tosi (aka Morpheus, matrixhasu)
My (little) site: http://matrixhasu.altervista.org/



Reply to: