Tuesday, June 14, 2011

More about Cron

Hello ,

All of you would be aware that cron is a time based scheduler used in Unix based operarting systems.We used cron to schedule and execute shell scripts or commands periodically or during any date / time.

There was a requirement within our system to run a job at specific time intervals,no better option than cron.

When I logged in and issued "crontab -l" I received the following message

crontab: you are not authorized to use cron. Sorry.


On further researching found that there are two important control files which control the permissions and access to cron.They are

"cron.allow and cron.deny",both these files are ascii text and owned by root.

These files are generally found under directory /etc/cron.d/ .

If the cron.allow file does not exist and your username is not there in entry cron.deny you will be able to use cron.

If the file exists and your username does not exist in the cron.allow file then you will not be able to use cron.

The cron.deny will contain all users who are denied access to cron.

My case I just requested Unix sysadmin to add my username in file - cron.allow.

No comments:

Post a Comment