Tim Foster wrote: > Nope, but I know the pain of trying to hack around the problem when > writing the ZFS Automatic Snapshots SMF service - each instance of that, > when enabled adds an entry to the root crontab, and removes it when it's > disabled.
Presumably with SMF-based cron, you'd make the cron jobs depend on your service. Service disabled, cron jobs don't run. Service enabled, cron jobs run. You could have your start/stop also enable/disable the cron jobs, but it doesn't seem necessary. > I echo the other comments in this thread about the time formats - trying > to say "do this every 5 days" in cron at the moment is really tricky to > do properly (see my comments in the start method code below [1]) Indeed. That's a variant I hadn't considered. I agree you can't do it correctly with current cron. (Happily, most people seem to want to schedule such things with respect to the work week and the workday.) However, if I wanted to use cron to drive my sprinklers, I'd notice right away. (That's not intended to be facetious; I'd *like* to drive my sprinklers from cron.) I don't know if I want to get into augmenting cron's time specification mechanisms, but it's clear that an XML representation can be made to be more extensible.