Halaman

Sabtu, 05 April 2014

Crontab Example



Making crontab running is easy only . Here I am going to say how to run crontab jobs. It is useful for anyone who is stuck on crontab.
*/1 * * * * cd /home/hacks && sh notify.sh
To make the script executable, we have to do:
chmod +x home/hacks/notify.sh
Here i run this script for every one minute ... By doing below script, you can write it in a log file to find whether its working
write log
*/1 * * * * cd /home/hacks && sh notify.sh>>test.log
send mail
*/1 * * * * cd /home/hacks && sh notify.sh>>test.log | mail -s "Hi this is example" user@domain.com

Tidak ada komentar:

Posting Komentar