3

I noticed some people use "crontab -l" to view cronjobs and "crontab -e" to edit them. However there are also times where people manually modify "/etc/crontab" to view/add/remove cronjobs.

Both methods work fine, the only thing I noticed is that cronjobs added with "crontab -e" doesn't show up inside "/etc/crontab" even though it still runs normally.

I'd like to know what are the differences between these 2 methods? Are there any advantages/disadvantages over each other?

PS. I'm on CentOS.

0

1 Answer 1

4

The normal per-user crontabs that you edit with crontab -e are located in /var/spool/cron.

/etc/crontab holds a "system-wide" crontab maintained by the system administrator.

There's typically also a /etc/cron.d directory where installed software can add entries.

Not the answer you're looking for? Browse other questions tagged .