Skip to main content

Cronjobs

Quelle: https://superuser.com/questions/81262/how-to-execute-shell-script-via-crontab/123894#123894

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" [email protected]