Shane Hathaway wrote:
> I'd like some suggestions for Unix/Linux software that does just a bit
> more than our old standby, cron.  I'd like:
>
> - A complete report of what was run and when (cron doesn't do this)
>
> - An email even if the job takes a long time (cron apparently doesn't
> send email if the job takes more than 5 minutes)

Could these two be added by a simple wrapper around your real cron job?
It could start by adding a single line to a log file, then steal all of
the input and pipe it into sendmail.  Rough guideline:

echo `date -u +"%s"` "$@" >> /var/log/jobsrun.log
( echo "From: $...@localhost"; \
  echo "To: $u...@localhost";
  echo "Subject: Job transcript for $1";
  echo; \
  "$@" ) |& sendmail -i $u...@localhost

Good luck.

- Eric

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to