cron schedule fire only on last day of month

"Brehl, Blake" <[email protected]> Wed, 12 Mar 2008 11:15:57 -0700
Newsgroups gmane.os.tru64.managers
Message-ID <06919C2CEC2A8D46A394A43403A52CFD72C4CD@moh-exc-006.main.intgin.net>
Hi Admins,
 
I'd like to fire a job only on the last day of the month from crontab.
Using ksh and a crontab entry of 
 
1 3 28-31 * * /apps/scripts/lastdayfire
 
and have the script figure out which day is the last of the month.
 
Any ideas?  


Here's a sample script that runs only on the 1st 2 days of the month.
 
1 2 1-14 * * /apps/scripts/1st2mondaysrunit
 
#!/bin/ksh
# script name 1st2mondaysrunit
DAYOFWK=`date +"%Ou"`; export DAYOFWK
if [[ $DAYOFWK = 1 ]]
  then /apps/scripts/1st2mondaysrunit
fi
 
 
Best Regards,    Blake
 
Tru64UNIX 5.1A sp1
GS80
 
Blake Brehl
Sys Admin/DBA
Anritsu Company United States
Morgan Hill, CA
[email protected]