[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Crontab last days of the month..



On Wed, Apr 14, 2004 at 01:35:13PM -0400, Rick Pasotto wrote:
> if [ $(date -d tomorrow '+%m') -ne $(date '+%m') ]
> then
> 	echo 'today is the last day of the month'
> fi

[ $(date -d tomorrow '+%d') -eq 1 ] && echo 'last of the month'

This can also be done directly in your crontab:

[ $(date -d tomorrow '+%d') -eq 1 ] && /path/to/executable

-- 
The freedoms that we enjoy presently are the most important victories of the
White Hats over the past several millennia, and it is vitally important that
we don't give them up now, only because we are frightened.
  - Eolake Stobblehouse (http://stobblehouse.com/text/battle.html)



Reply to: