Showing posts with label Linux Important Command. Show all posts
Showing posts with label Linux Important Command. Show all posts

Tuesday 9 August 2016

Different Crontab Example in Linux


Crontab Format


Field
Description
Allowed Value
MIN
Minute Field
0-59
HOUR
Hour Field
0-23
DOM
Day of Month
1-31
MON
Month Field
1-12
DOW
Day of Week
0-6
CMD
Command
Any Command to Execute


Run Crontab every 30 mintues between 09:00am to 20:00 pm daily

*/30 09,10,11,12,13,14,15,16,17,18,19,20 * * * /app/script/abs.sh
or
*/30 09-20 * * * /app/script/abs.sh

Run Crontab every 30 mintues daily

*/30 * * * * /app/script/abs.sh

Run Crontab at specific time like 10th June 08:30 AM

30 08 10 06 * /app/script/abs.sh

30 – 30th Minute
08 – 08 AM
10 – 10th Day
06 – 6th Month (June)
* – Every day of the week

Run Crontab every day at 21:55

55 21 * * * /app/script/abs.sh

55 – 55th Minute
21 – 09 PM
* – Daily
* – Every Month
* – Every day of the week