Visit our main website ›
Page Title
Body *Adding user tasks* To add a task to a user's cron jobs, use the command <code>crontab -e</code>. You can view a user's crontab with <code>crontab -l</code>. Use <code>man crontab</code> for more information. The format for the crontab file is: <pre><code> # +---------------- minute (0 - 59) # | +------------- hour (0 - 23) # | | +---------- day of month (1 - 31) # | | | +------- month (1 - 12) # | | | | +---- day of week (0 - 7 with Sunday=0 & 7) # | | | | | # * * * * * command to be executed </code></pre> An asterisk indicates that the job is to run every minute, hour, etc. To help you remember the format, you can paste these comments the top of your crontab file. *Examples:* This will run a script every 2 minutes: <pre>*/2 * * * * /path/to/script</pre> This will run a script on the 1st and 15th of every month at 4am: <pre>00 4 1,15 * * /path/to/script</pre> *Adding system tasks* For system tasks, you can also put a script in /etc/cron.[hourly, daily, weekly, monthly]. You can find examples in /etc/cron.daily. Find more information in the "Redhat docs":http://www.redhat.com/docs/manuals/linux/RHL-7.2-Manual/custom-guide/cron-task.html
Make page private