Quantcast
Channel: CRON job to run on the last day of the month - Stack Overflow
Viewing all articles
Browse latest Browse all 23

Answer by zigarn for Cron job to run on the last day of the month

$
0
0

For a safer method in a crontab based on @Indie solution (use absolute path to date + $() does not works on all crontab systems):

0 23 28-31 * * [ `/bin/date -d +1day +\%d` -eq 1 ] && myscript.sh

Viewing all articles
Browse latest Browse all 23

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>