Showing posts with label unix cron. Show all posts
Showing posts with label unix cron. Show all posts

Thursday, December 6, 2012

UNIX cron

Every user can have its own list of cron jobs which can be viewed using 
crontab -l

In order to add or edit a cron job , you need to execute the following commands

export EDITOR=vi
crontab -e

Now , you can edit the file as you do while working on a vi editor .

For more tips on vi editor , you can follow the below link authored by me .
http://middlewareplay.appspot.com/kbhtml/Vi_editor.html

Note for new unix users , refrain from running the command crontab -r as this will remove your existing crontab file ( list of all cron jobs ) and there is no way of getting it back until you have the backup of crontab file  ,somewhere .

Below is the list of important  cron files

 /etc/cron.d main cron directory
/etc/cron.d/cron.allow list of allowed users
/etc/default/cron contains cron default settings
/etc/cron.d/cron.deny list of denied users
/var/cron/log accounting information
/var/spool/cron/crontabs spool area for crontab has crontab files for each user.