On Tue, May 27, 2008 at 02:24:45PM -0500, Nicolas Williams wrote:
> On Tue, May 27, 2008 at 12:01:38PM -0700, Jordan Brown wrote:
> > Cron jobs look a lot like services that are loops with "sleep" in them. 
> >  (Sleep(1) or sleep(3), your choice :-)
> 
> I don't agree: the status of each execution of the "loop body" minus the
> sleep is tracked separately.

I suppose I should expand on this.  Today cron checks the status of its
cron jobs when the exit and, if non-zero, sends e-mail to the job's
owner user with the output of the cron job.

cron does not, however, keep track of past job runs, and this is lame:
you must check your e-mail.  One potentially quite useful improvement to
cron might be to track failure rates per-job and recent history.
Another potentially quite useful improvement to cron might be job
dependencies (e.g., "user is logged in on console," "user is logged in,"
"Kerberos credentials are available," ...).

There's a lot of ways in which SMF can inform and improved cron service,
but I'm finding it harder and harder to see individual cron jobs as SMF
services.  Re-using large chunks of SMF (see earlier posts) to implement
a model that is better suited to cronjobs strikes me as a possibly great
way to go.

Nico
-- 

Reply via email to