Adding second-level resolution to cron(8).

Rich Morin rdm at cfcl.com
Sun Jul 6 22:45:26 PDT 2003


I have a project for which I need a generalized time-based scheduling
daemon.  cron(8) is almost ideal, but it only has minute-level resolution.
So, I'm thinking about modifying cron to add second-level resolution.

Before I start, I thought I'd ask a few questions:

   *  Has someone already done this?

   *  Is it a Really Bad Idea for some reason?

   *  Would anyone else be interested in having these modifications?

The crontab(5) syntax is pretty well set in stone, but I think I see a
way to extend it without causing any breakage.  Specifically, I'd extend
the format of the "minute" field, as:

   1           minute 1
   1,5         minutes 1 and 5
   *           any minute
   */5         any minute that is divisible by 5

   1:2         second 2 of minute 1
   1:2,5:10    second 2 of minute 1 and second 10 of minute 5
   *:3         second 3 of any minute
   *:*/5       any second that is divisible by 5

Comments and suggestions (sans flamage) are solicited.

-r
-- 
email: rdm at cfcl.com; phone: +1 650-873-7841
http://www.cfcl.com/rdm    - my home page, resume, etc.
http://www.cfcl.com/Meta   - The FreeBSD Browser, Meta Project, etc.
http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series


More information about the freebsd-hackers mailing list