I like smart solutions to annoying problems.

It's quite ingenious really:

00 09 * * 0 [ $(date +\%d) -le 07 ] && /run/your/script

This runs a cronjob every Sunday at 9 am. The job itself checks if the current day is less or equal to 07, effectively covering the first seven days of every month. If true it continues, if false it doesn't run.

Next Post Previous Post