in reply to Accessing cron job output from a web page?

Just wanted to let you guys know we went with the periodic script to create the report pages. One thing I would like to improve upon is that each time through, the script re-creates everything that is already there plus whatever is new in the past five minutes. I'd like to have it do incremental updates only, but other than that, the system is working great.

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.

  • Comment on Re: Accessing cron job output from a web page?