This one time, at band camp, Peter Hardy wrote: >On Thu, 2004-11-04 at 18:15, Peter Hardy wrote: >> # Progress report annoyances. >> # Only send on Monday if it isn't a public holiday >> 30 10 * * 1 benno /usr/bin/wday -q || python /home/disy/progress_annoy.py >> # Only send on Tuesday if Monday was a public holiday >> 30 10 * * 2 benno /usr/bin/wday -q `/bin/date -d yesterday +%Y%m%d` && python >> /home/disy/progress_annoy.py > >I know this could be condensed to one line like > >30 10 * * * ( wday -q || wday -q `/bin/date -d yesterday +%Y%m%d` ) && >/path/to/script > >, I just thought splitting across two lines would be more readable. :-)
Actually, the two line version is correct, and the one line version isn't: your script will run every day. But, change the last * to 1,2 and I think you'll be right. cron even lets you use "mon,tue", I think. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
