Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

System Crontab or Root Crontab

System Crontab or Root Crontab.

/etc/crontab is the system wide crontab.

The format of /etc/crontab is like this:

# m h dom mon dow user      command
*   *  *   *   *  someuser  echo 'foo'

while crontab -e is per user, it’s worth mentioning with no -u argument the crontab command goes to the current users crontab. You can do crontab -e -u  to edit a specific users crontab.

Notice in a per user crontab there is no ‘user’ field.

# m h  dom mon dow  command
*   *   *   *   *   echo 'foo'

An aspect of crontabs that may be confusing is that root also has its own crontab. e.g. crontab -e -u root will not edit /etc/crontab See Configuring cron.

In most Linux distros, per user crontabs are typically stored in: /var/spool/cron/crontabs/ (vixie-cron).

RHEL based distributions are stored in /var/spool/cron/. (cronie)



This post first appeared on Microsoft, IT, System Center, Infrastructure, please read the originial post: here

Share the post

System Crontab or Root Crontab

×

Subscribe to Microsoft, It, System Center, Infrastructure

Get updates delivered right to your inbox!

Thank you for your subscription

×