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

Re: [users] Re: crontab



On Sat, Jul 07, 2001 at 12:43:42PM +0200, Martin F. Krafft wrote:
> this is not right. if only DOW is specified, then these backups will
> only happen friday or saturday, no matter what day of the month it is.

You're doing fine so far...

> if you were to specify both, DOW and DOM, then it would only execute
> whenever the e.g. 8th of a month is a friday.

But this is wrong.  According to man 5 crontab, if both DOM and DOW are
given, they are ORed together, not ANDed:

       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 (ie, aren't *), the command will  be
       run when either field matches the current time.  For exam­
       ple,
       ``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.



Reply to: