Fields for Crontab

Crontab is the scheduling tool for linux servers. If you would like a certain script run at a specific time of day on a regular basis you use crontab. You place the file in the “/etc/cron.d” folder for system wide scripts or run the command “crontab -e” for per user scripts. Enter the following into your cron file (e.g. /etc/cron.d/myjob):

01 07 * * *         <user>         /path/to/script

Note: Script will run every day at 7:01 AM. Also specify the user that owns the script (e.g. root or bob or max etc…)

FieldAllowed Values
minute0-59
hour0-23
day of the month1-31
month1-12
day of the week0-7

Run the command “man crontab” from your terminal for a more detailed explanation.

Categories:

Comments are closed

Archives