Advertise on warmetal.nl!
Click for more information
about advertising here.

Did you find this website useful? Did I save you a lot of time?
Please consider donating to support this site:

 
Table of Contents

Cron

Scheduled tasks:

minutes hour dayofmonth month dayofweek user command

* * * * * root everyminute
*/5 * * * * root every5minutes (only works on linux, aix needs 0,5,10,15,20,25,30,35,40,45,50,55)
1 * * * * root everyhour
1 1 * * * root everyday
1 1 * * 0 root everyweek (0=Sunday)
1 1 1 * * root everymonth

Crontab

To edit a user's crontab enter the command:
crontab -e

To view your crontab file enter the command:

crontab -l

To remove all your crontab jobs enter the command:

crontab -r 

Cron Files

Crontabs:
/var/spool/cron

Cron itself:
/var/adm/cron

Cron security

CRON users:
To allow root only:
  • remove /var/adm/cron/cron.deny & /var/adm/cron/cron.allow

To allow anyone to use it:

  • touch cron.deny if it does not exist.

To explicitly allow a user and no one else except root:

  • touch cron.allow & put user ID in it.

To explicitly deny a user:

  • touch cron.deny & put user ID in it.

Discussion

Enter your comment:
 
cron.txt · Last modified: 2011/07/11 14:34 by sjoerd