Configure a Cron Job

The /etc/cron.allow and /etc/cron.deny files are used to restrict access to cron. The access control files are read every time when a user tries to add or delete a cron job. Both the access control files should possess one username on each line with no whitespaces. It is not necessary to restart the cron daemon (crond when the access control files have been modified. The root user can always use cron, regardless of the usernames listed in the access control files.

If the cron.allow file exists, only users listed in it are allowed to use cron, and the cron.deny file will be ignored.

If the cron.allow file does not exist, users listed in cron.deny file will not be allowed to use cron.