Re: Scheduling Jobs - Last day of the month - HOWTO?



On Wed, 30 Aug 2006 10:51:31 -0500, Michael B Johnson wrote:
I would like to schedule a job on the last day of each month.

Create a script to be executed on 28-31 day of month via cron.
The script figures out if it is last day of the month.


set $(cal)
_count=$(($# - 1))
shift $_count
_last_day=$1
_today=$(date "+%d")

if [ $_today -eq $_last_day ] ; then
run_your_script_here
fi
.