How to run cron jobs in Debian/Ubuntu


Hello everyone

I have not used cron jobs so much and i am trying to learn how to use the cron and crontab commands.
I would like to know if i can simply put my scripts in cron.hourly, cron.daily, cron.weekly directories under /etc to run jobs on houlry, daily and weekly basis on my Ubuntu system.

How can i also prevent other users from using the crontab and cron commands?



If you have a system that is always on like a production server then scheduling a job via crontab is a good process as these are scheduled at absolute times / day.

However if it is a end user who turns on & off the machine then I would suggest anacron. These are schedule relative to the boot up time.

Below is a good article on the subject.

Anacron s. Cron


Ok, how can i restrict the use of crontab, cron and anacron commands on my system?