New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add timer objects to Firebird database [CORE1717] #2142
Comments
Modified by: @livius2description: Add posibility to create timer objects - working like procedure and fire at specified time or interval simple example : create Timer DeleteOldData RUN_INTERVAL 60*1000 => Add posibility to create timer objects - working like procedure and fire at specified time or interval simple example : create Timer DeleteOldData RUN_INTERVAL 60*1000 |
Commented by: @livius2 That core-743 is suppose is proposition of external sheduler to run some tasks |
Commented by: Homer Jones (homerjones) This would be a great benefit for procedures that must be run once a day without user intervention. Client side task scheduling is dependent on the accuracy of the system clock, which users often change by accident. Moreover, in a multi-user environment, heroic logic must be put into play to assure a procedure is run only once, but always run each day (or week, or month, etc). It is a better bet to rely on the single clock of the server, than multiple clocks in a mult-user setup. The more we can do on the server, the more reliable applications become. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @livius2
Is duplicated by CORE4012
Is duplicated by CORE4052
Duplicates CORE1613
Duplicates CORE743
Votes: 2
Add posibility to create timer objects - working like procedure and fire at specified time or interval
this can change some client applications to very "thin clients"
and i suppose many people can find better example of use
simple example :
create Timer DeleteOldData RUN_AT 12:30
as
BEGIN
DELETE FROM SOME_TABLE WHERE DATE_INSERT<CAST('now' AS DATE) - 30;
END;
create Timer DeleteOldData RUN_INTERVAL 60*1000
as
DECLARE VARIABLE VAR_ID INTEGER;
DECLARE VARIABLE VAR_NAME VARCAHR(40);
DECLARE VARIABLE VAR_DT TIMESTAMP;
BEGIN
FOR SELECT
ID, NAME, DT
FROM
BUFFER
INTO :VAR_ID, :VAR_NAME, :VAR_DT
DO
BEGIN
UPDATE SOMETABLE SET LAST_ACCES=:VAR_DT WHERE NAME=:VAR_NAME;
DELETE FROM BUFFER WHERE ID=:VAR_ID;
END;
END;
The text was updated successfully, but these errors were encountered: