Running a cron job for the last day of the month

Hal Burgiss hal at foobox.net
Thu Apr 1 17:55:11 UTC 2004


On Thu, Apr 01, 2004 at 08:25:32AM -0800, Mike Koponick wrote:
> Hello,
> 
> I would like to run a script on the last day of the month, preferably at

[...]

if ! [ "$(date -d "+ 1 day" '+%b')"  =  "$(date  '+%b')" ]; then
  echo last day of the month
else
  echo same old month
fi

Run that at 11:59 every day.

-- 
Hal Burgiss
 





More information about the redhat-list mailing list