> From: Russell Nelson <[EMAIL PROTECTED]>
> Date: Wed, 21 Feb 2001 11:27:24 -0500 (EST)
>
> Michael Handler writes:
> > What's really needed in this instance is a program that, given an
> > execution schedule on the command line, figures out how long until the
> > next scheduled execution, and sleeps that long (sleepuntil).
> >
> > Potential problem: clock shift (NTP resync, DST transitions) could confu
> se
> > it. Maybe it has to wake up (SIGALRM) periodically and recheck the time
> > until execution. Could get ugly.
>
> No, you need a program which scans a directory looking for files with
> a timestamp NOT in the future. Whenever it encounters any of these,
> it hands the file to the shell. Presumably the last line in the file
> either removes the file or runs a touch command to reschedule.
>
> I'd go ahead and write this problem, but I'm not sure how portable are
> future timestamps. I know that tar complains about future timestamps,
> but it sets them anyway. Anything else?
If someone wants to write a cron replacement, they should spend some time
looking at functionality provided by other non-unix based systems.
A few years ago i had a gig teaching use of Tivoli Maestro, which is best
described to Unixheads as "cron on steroids". It's a port of a mainframe
scheduling tool that does some real cool things with dependencies. In my
opinion, it has two main problems: 1) it doesn't "feel" like a unix tool, and
2) it's horrendously expensive.
The neatest feature it has, however, is a very sophisticated dependency
relationship, so you can say things like:
Run job A on work days
Run job B on holidays and weekends
Run job C after either job A or job B has completed. (but don't run job C if
A or B did not run).
These dependencies are also cross system, so you can have a job that
doesn't run on system X until another job has finished running on system Y.
I started hacking together a proof of concept (in perl, so we know the
performance would have sucked if I'd ever finished) using the future
timestamp scheme that Russell describes a while back.
Chris
--
Chris Garrigues http://www.DeepEddy.Com/~cwg/
virCIO http://www.virCIO.Com
4314 Avenue C
Austin, TX 78751-3709 +1 512 374 0500
My email address is an experiment in SPAM elimination. For an
explanation of what we're doing, see http://www.DeepEddy.Com/tms.html
Nobody ever got fired for buying Microsoft,
but they could get fired for relying on Microsoft.
PGP signature