Re: Functions performed on intervals
От | Josh Berkus |
---|---|
Тема | Re: Functions performed on intervals |
Дата | |
Msg-id | web-84978@davinci.ethosmedia.com обсуждение исходный текст |
Ответ на | RE: Functions performed on intervals (Jimmie Fulton <JFulton@ehso.emory.edu>) |
Список | pgsql-sql |
Jimmie, > Thanks for your response, You're welcome. > What you are saying here is that I will indeed need an external timed > event > (cron) to update a field/history table of some fashion, correct? > This is my > main question. Yes. Absolutely you will. Unless, of course, your users are already forced to go though a manual month-end procedure, in which case it could be tied to that. This is actually really easy to set up: 1. Create a shell script that calls psql and a SQL script in 2; 2. Create a SQL script that calls all of the functions that you want to run on a (daily/weekly/monthly) basis. 3. Create a cron item that calls the shell script (1.). Handling errors etc. obviously adds a layer of complexity to the scripting. I also have the functions write to a schedule_log table showing what they've done. -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete informationtechnology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco
В списке pgsql-sql по дате отправления: