I have written a realtime bus tracking program that runs a cron every minute to check the service of the bus. In order to remove some server resources I am going to be creating an instance on PHPfog then croning it there. My Question is what's the best way to know if the cron failed and if so then run the local server copy as a backup?
|
feedback
|
|
I redirect both of stdout and stderr to a log file:
and use Nagios's check_logfiles plugin to monitor this log:
You can also write an event handler to run the local server copy. | |||||||
feedback
|
if /usr/bin/check_bus; then local_copy; fi? – minaev Dec 13 '11 at 13:15