I am first time trying to set cron job in my linux server. I want to set every 10 mins my file will run. The cron works fine but the problem is that the cron run as following
00:00 00:10 00:20
but i want it in this way
00:05 00:15 00:25
I am first time trying to set cron job in my linux server. I want to set every 10 mins my file will run. The cron works fine but the problem is that the cron run as following
00:00 00:10 00:20
but i want it in this way
00:05 00:15 00:25
If you have Vixie cron (the most common implementation these days), you can use this syntax:
5-55/10 * * * * command
where 5-55
specifies a range of minutes and /10
says to run once every 10 minutes.
If not, just enumerate all the times you want it to run:
5,15,25,35,45,55 * * * * command
Running man 5 crontab
should show you the documentation. (man crontab
will show you the document for the crontab
command; man 5 crontab
describes the file format.)
Reading the manual page you need an entry in your crontab file such as
5,15,25,35,45,55 * * * * <script path>
http://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/
Check out this link
Easy to remember format:
* * * * * command to be executed
- - - - -
| | | | |
| | | | ----- Day of week (0 - 7) (Sunday=0 or 7)
| | | ------- Month (1 - 12)
| | --------- Day of month (1 - 31)
| ----------- Hour (0 - 23)
------------- Minute (0 - 59)