Re: 'Universal' schedule table defintion

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: 'Universal' schedule table defintion
Дата
Msg-id 200302140952.04009.dev@archonet.com
обсуждение исходный текст
Ответ на 'Universal' schedule table defintion  (Dennis Gearon <gearond@cvc.net>)
Список pgsql-general
On Thursday 13 Feb 2003 11:08 pm, Dennis Gearon wrote:
> Anyone ever seen a table definition for schedules that could handle the
> following:
>
> 'Every 3rd Thurday, except for national holidays'
> 'from 8 AM to 10PM, closed 12-1pm and 6-7pm'
> 'The period of time Thursday the Xth, xxxx to Sunday the Yth, xxxx,
>    11am to 8pm Thursday and Friday, 8am to 6pm Saturday and Sunday'
> 'Monday thru Friday 10-3pm' (my kind of hours!)
>
> Obviously, I can do this with the strings above, but there is now way that
> the database could search for occurences of those using the strings, unless
> I come up with a special 'schedule language' and write a function to use in
> the select statement, (which I may have to do anyway).

Two suggestions:

1. Explore "man crontab" for possibilities. If nothing else you'll be able to
explain it in the technical docs by saying "it's like crontab"

2. Even with (1) you're looking at sets of rows to represent some of the
above, I'd have a column with values of ADD|SUBTRACT to overlay rows and
produce the final pattern.

Best of luck, and I'd be interested in how well your choice works out for you.
--
  Richard Huxton

В списке pgsql-general по дате отправления:

Предыдущее
От: "Thomas T. Thai"
Дата:
Сообщение: ezmlm archive to postgresql db
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: uppercase = lowercase