Thanks for the explanation Stu, I now understand Martin's point.
I would suggest then changing the cront to:
0 4 15-21 * * /path/to/my/script
and then have the script check if it is indeed a Sunday.

Rafael


On Tue, Dec 29, 2009 at 1:18 PM, Stu Teasdale <[email protected]> wrote:

> On Tue, Dec 29, 2009 at 11:34:56AM -0500, Rafael Carneiro wrote:
> > $quoted_author = "Martin Barry";
> > > b) schedule with CRON every day from 15th to 21st but exit immediately
> if
> > it's not a Sunday.
> >
> > That's exactly what one would achieve by using the crontab entry suggest
> in
> > the first email of this thread (2nd zero=Sunday):
> > 0 4 15-21 * 0 /path/to/my/command
>
> Unfortunately a quirk of the crontab format is that weekdays logically
> OR with the other fields, rather than ANDing, as the previous replies
> explained. Check man 5 crontab for details.
>
> Stu
>
> --
> From the prompt of Stu Teasdale
>
> Love means nothing to a tennis player.
> _______________________________________________
> Opsview-users mailing list
> [email protected]
> http://lists.opsview.org/lists/listinfo/opsview-users
>
_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-users

Reply via email to