On Mon, Feb 24, 2003 at 01:17:27PM +0000, Simon Wistow wrote: > On Mon, Feb 24, 2003 at 12:26:14PM +0000, alex said: > > I wonder if it's possible to store the crontabs in an SQL table (with > > columns for seconds, hours, days, months and day of week) and construct > > an SQL statement that would match events within a certain date range? > # pseudo code to make an sql statement > # that will find all events that match on 24 feb 2003 > > where (day=24 or day=* or day='/1' or day='/2' > or day='/3 or day='/4' > or day='/6' or day='/8' > or day='/12' or day='/24') > and (month='2' or month='*' or month='/1' or month='/2') > and (year=2003 or year='*' or year like '/%')
Of course, crontab entries have no year field. But you're stuffed if the month (for instance) looks like 1-4,8,10-12. -- David Cantrell | Looking for work | http://www.cantrell.org.uk/david/cv This is a signature. There are many like it but this one is mine.