Is there a syntax checker for cron.d files?

Is there a lint tool or a command line syntax checker for the files in /etc/cron.d? I work on a support team, and some members of the team have been known to mix up the syntax for crontab and /etc/cron.d (i.e. omitting the user), and since such entries will cause all of the entries in the file to fail, I would like to be able to test the entries in a given file in /etc/cron.d to make sure that the syntax is correct before cron jobs start failing.

I've read through the cron(8) man page and searched google and serverfault for cron.d lint and cron.d syntax checker with no success.


Solution 1:

Maybe this can help you: chkcrontab In short:

chkcrontab is a script to check crontab files like those in /etc/cron.d and /etc/crontab. It tries to catch glaring errors and warn on suspect lines in a crontab file. Some valid lines will generate warnings. Certain silly yet valid crontab lines will generate errors as well.

Alternatively, you can routinely check for cron logs (especially for the string "bad minute")