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…)
Field | Allowed Values |
---|---|
minute | 0-59 |
hour | 0-23 |
day of the month | 1-31 |
month | 1-12 |
day of the week | 0-7 |
Run the command “man crontab” from your terminal for a more detailed explanation.
Comments are closed