Re: howto tell cron run last day of month

2001-01-04 Thread Dave Thayer
How about something like: if [ $(date -d tomorrow +%m) == $(date +%m) ] ; then echo "Not the end of the month" else echo "End of the month" fi HTH, your pal dave -- Dave Thayer Denver, Colorado USA [EMAIL PROTECTED]

Re: howto tell cron run last day of month

2001-01-04 Thread Ted Harding
On 03-Jan-01 Nate Duehr wrote: > Would midnight on the 1st work? Just a thought. > > There's no situations I can think of where the first of the month > doesn't exist in most locales, since daylight savings changes > officially > at 2 AM in places that do that. > > (like here... grrr) > > On Tu

Re: howto tell cron run last day of month

2001-01-03 Thread Rick
check out the GNU date function. I know that you can specify 'yesterday' and believe that you can 'tomorrow' as well, so if tomorrow is the first, then today is the last. Sorry, I'm on a solaris box with boring date and it doesn't do that to my knowledge. rick Nate Duehr writes: > Would midnig

Re: howto tell cron run last day of month

2001-01-03 Thread Nate Duehr
Would midnight on the 1st work? Just a thought. There's no situations I can think of where the first of the month doesn't exist in most locales, since daylight savings changes officially at 2 AM in places that do that. (like here... grrr) On Tue, Oct 17, 2000 at 06:12:21PM +0200, Jaume Teixi wr

Re: howto tell cron run last day of month

2000-10-17 Thread Timo Benk
Hi, On Tue, 17 Oct 2000, Jaume Teixi wrote: > I run a cron script 27-31 > then inside the script i need to check if it this last day of month > > how to check this ? #!/bin/sh MONTH=`date +%m` DAY=`date +%d` case "$MONTH" in 2) DAYS=28 ;; 4|6|9|11) DAYS=30

howto tell cron run last day of month

2000-10-17 Thread Jaume Teixi
I run a cron script 27-31 then inside the script i need to check if it this last day of month how to check this ? thanks, jaume.