in reply to Accessing cron job output from a web page?
So to summarize: we have a cron "wrapper" script that executes the desired program and inserts tags into the beginning of the log file indicating the start of the run and whom to email in case of error. It then runs the program, capturing output and tagging STDERR with HTML tags to visually differentiate it from the rest. Then it prints a closing tag.
The begin and end tags are because the script that creates the html can detect whether the program is still running, and will hold off on doing anything unless it sees the special end run sequence.
One other feature we plan to build in is a tag at the beginning (along with the emails, perhaps right after) that tells the report program how long to wait until it decides that the program has run for too long without a closing tag, and thus send an email alerting the owner.
|
|---|