Tito Miguel Costa
Refactoring ideas

Crontab in linux

Location and e-mail

By default cron searches its spool area /var/spool/cron/crontabs directory for crontab files. All files which are named after username i.e. accounts in /etc/passwd file. So if your username is vivek, crontab file location should be /var/spool/cron/crontabs/$USER i.e. /var/spool/cron/crontabs/vivek. Note that crontabs in this directory should not be accessed directly - the crontab command should be used to access and update them as follows:

crontab -e

To view your crontab file (cron jobs) type

crontab -l

If you would like to get an e-mail with the output of the commands, add to your cron:

MAILTO=your@email.com
1 April, 2013
Tutorial
Linux, Cron

Comments