Wow. Thank you so much for emailing me back! I didn't expect a response that quickly. In response to your reply:
I tried this in the monitrc file: "check program mri_script with path /home/twapp/scripts/mri_song_block.php every "* 8 * * 1-5" # Check every workday between 8AM-9AM if status != 0 then alert" But when trying to start monit after editing the config file, I get this error: "/etc/monit/monitrc:13: Error: syntax error 'mri_script'" It shouldn't matter what the check name is right? If this helps, the script I am trying to monitor runs once a day and is a php script. (not sure if php makes a big difference or not) Any thoughts? On Tue, Jan 17, 2012 at 4:14 PM, Jan-Henrik Haukeland <[email protected]>wrote: > > On Jan 17, 2012, at 6:56 PM, Tyler Yosick wrote: > > > I am in need of some help. I am trying to get monit to check a script at > a certain time daily. I want to make sure the script completes, and if it > doesn't, to output errors to an email or something. > > You can use something like this [1]: > > check program name_of_test with path /path/to/script.sh > every "* 8 * * 1-5" # Check every workday between 8AM-9AM > if status != 0 then alert > > In your script, in case of an error, everything written to stderr will be > included in the alert message emitted by Monit. > > [1] > > See > http://mmonit.com/monit/documentation/monit.html#program_status_testing > and http://mmonit.com/monit/documentation/monit.html#service_poll_time > > > -- > To unsubscribe: > https://lists.nongnu.org/mailman/listinfo/monit-general > -- Tyler Yosick TuneWiki Operations
-- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general
