LinuxSay - A Discussion Forum for Linux Enthusiasts

Need Cronjob monitor status over email alerts


#1

Hi All,

I need a tool for monitoring the cron jobs which will send email alerts like when ever the job is running successfully and ending succeffully or failed,etc., is any one have any idea regarding this.Please let me know.

Thanks in advance
Wasim…


#2

@walter

You can monitor cron job using log print and email alerts.
In log print :-

script > /var/log/logfilename-$(date +\%d-\%m-\%Y-\%H-\%M-\%S).log

In mail alerts :-
If you have c-panel access there is option in cron, you can set email alerts as well:

* * * * * scrip | mail -s "Subject of Mail" name@example.com.com

or you can use python mailer with script.