tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* cron schedule fire only on last day of month
@ 2008-03-12 18:15 Brehl, Blake
  0 siblings, 0 replies; only message in thread
From: Brehl, Blake @ 2008-03-12 18:15 UTC (permalink / raw)
  To: tru64-unix-managers

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
blake.brehl@anritsu.com



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-03-12 18:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-12 18:15 cron schedule fire only on last day of month Brehl, Blake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox