Cron Tip: Monthly Crontab Reminders

Cron jobs are great, but it is very easy to forget what jobs are running, especially if you’re administering multiple cron tables on different servers. The solution is to add a crontab reminder job at the top of every cron table, which emails a listing of the cron table every month:

@monthly        : Crontab Reminder ; crontab -l

The colon is the no-op command, whose arguments describe the job for the email subject line. The ‘crontab -l’ lists the cron table for the current user. Cron displays the user and host on the subject line, so you will know which account is listed.

Subject: Cron <chuck@doublebrain> : Crontab Reminder ...

Now, every month you’ll get a reminder email about what jobs are running under each account. This will also serve as a monthly test of the accounts email settings.

Leave a Reply

Your email address will not be published. Required fields are marked *