Links

   Quran Explorer - Interactive Audio Recitations & Translations

Wednesday, February 15, 2012

Linux Cron Jobs

Cron Jobs aka Scheduled Tasks

1. To see crontabs for root
#crontab -u root -l


2. To edit
#crontab -u root -e
Edit the time (min hh) to 00 10 - so that this task runs every day at 10 a.m.


a. Run at 9pm everyday
00 21 * * * wget -q "http://192.168.1.254:9090/bizypalace/push?to=0202058726&msg=NOTICE (9 PM) Server OK: $(date)"

b. At midnight 00 00 hours everyday
00 00 * * * wget -q "http://192.168.1.254:9090/bizypalace/push?to=0202058726&msg=CRON AT MIDNIGHT"

c. every 2 hours from 4am till 6pm
00 04,06,08,10,12,14,16,18 * * *

Note: in my examples am running wget but u can use any bash command

3. To check Log
tailf /var/log/cron

No comments:

Post a Comment

Feel free to leave a comment