running a job on the 2nd Sunday of each month?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Patrick Fleming EA
Date:  
Subject: running a job on the 2nd Sunday of each month?
On Wed, 5 Mar 2003, Scott H wrote:

>
> I am also trusting the same.
>
> > Make the first line of the script check for
> > day of the week and exit if
> > it's not Sunday. <snip>


I would write it:
#!/bin/bash
check=`date +%a`

if [ !$check = "Sun" ]; then

exit 0
fi
(rest of your script goes here)

Of course I'n not a bash guru and there may be better ways of doing this.
Note that those are backticks around date +%a


>
> OK, thanks, and how does one write that? (Sorry,
> newbie at all this, I'm RTFMing, but haven't
> found that yet)
>
> /home/scott/sigs/thankyous/sincere.html :)
>
>
>
>
> .
>
>
>
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.yahoo.com/
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>


--
Patrick Fleming, EA
Licensed to represent taxpayers
before Exam, Appeals, and Conference
divisions of the IRS