Re: [SLUG] Making cron work around public holidays

2004-11-04 Thread Peter Hardy
On 11/04/04 23:14, [EMAIL PROTECTED] wrote: On Thu, 04 Nov 2004 18:58:06 +1100 Peter Hardy <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED]:~$ ( wday -q || wday -q `/bin/date -d yesterday +%Y%m%d` ) && echo Hello [EMAIL PROTECTED]:~$ at a tangent to the main question, did you actually check this in c

Re: [SLUG] Making cron work around public holidays

2004-11-04 Thread mlh
On Thu, 04 Nov 2004 18:58:06 +1100 Peter Hardy <[EMAIL PROTECTED]> wrote: > Actually, I think you've got it the wrong way around. The one line > version works for today. > [EMAIL PROTECTED]:~$ ( wday -q || wday -q `/bin/date -d yesterday +%Y%m%d` ) && echo > Hello > [EMAIL PROTECTED]:~$ > at a t

Re: [SLUG] Making cron work around public holidays

2004-11-04 Thread Denis Crowdy
People don't respond to email on a public holiday? What madness is this? Change your users... Denis Crowdy On Thu, Nov 04, 2004 at 06:15:16PM +1100, Peter Hardy wrote: > Thought I might share my new favourite utility, wday. > > So I've got a script that's launched by cron every Monday. It ema

Re: [SLUG] Making cron work around public holidays

2004-11-04 Thread amos
Peter Hardy wrote: Thought I might share my new favourite utility, wday. Thanks. It's always useful to see real-world examples from users of such tools. ... day was a public holiday. Debian didn't seem to have anything pre-packaged, and I was starting to despair of evil calendar(1) What about "remi

Re: [SLUG] Making cron work around public holidays

2004-11-03 Thread Peter Hardy
On Thu, 2004-11-04 at 18:39, Jamie Wilkinson wrote: > This one time, at band camp, Peter Hardy wrote: > >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

Re: [SLUG] Making cron work around public holidays

2004-11-03 Thread Jamie Wilkinson
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 Mon

Re: [SLUG] Making cron work around public holidays

2004-11-03 Thread Peter Hardy
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 /u

[SLUG] Making cron work around public holidays

2004-11-03 Thread Peter Hardy
Thought I might share my new favourite utility, wday. So I've got a script that's launched by cron every Monday. It emails reminders to all users who haven't sent a progress report for the previous week. Simple. Amongst other changes to be done, I was asked if this system could be modified so, if