Use Following command to see scheduled crontab list.
crontab -l
Use following command to add/delete crontab processes
crontab -e
use Following Command to stop/start/status/restart crontab prosesses.
/etc/init.d/crontab start
/etc/init.d/crontab stop
/etc/init.d/crontab status
/etc/init.d/crontab restart
min hour day_of_month month day_of_week Process
(0-59) (0-24) (1-31) (1-12) (0-6) process
(jan-dec)
Examples:
To run cd /home/etutionlk command in every minute. Add following crontab statement.
*/1 * * * * cd /home/etutionlkRun test.sh file in every hour
* */1 * * * sh test.shRun xmas_greeting.sh file in 25th of December in every year at 8.00 am
0 8 25 12 * sh xmas_greeting.shHave a Nice Experience with crontab !
0 comments:
Post a Comment
Ask anything about this Tutorial.