Run a cronjob on the last day of the month

Here is a pretty genius way of running a cron job on the last day of the month. It just checks that tomorrow is the first of the month, and runs your script if it is.

0 8 28-31 * * [ "$(/bin/date +%d -d tomorrow)" = "01" ] && /your/script.sh
Leave A Reply
All content licensed under the Creative Commons License