Re: [WebDNA] triggers executed at boot instead of scheduled time
This WebDNA talk-list message is from 2011
It keeps the original formatting.
numero = 107174
interpreted = N
texte = Hi Steve,As mentioned in the trigger admin:"The trigger will execute if it is enabled, and the NextExecute timeis earlier than the current time"My guess is that the NextExecute had passed while your server was having issues..Anyway,I don't like to rely on triggers to run code at certain times.Instead, I wrap my code to be fired in a "time wrapper"..ie. (code to be ran once daily)-----------------------------------------------------------[if ({[time]} < {sometime}) & ({[time]} > {sometime})] [then] [!] ** Some solution to know if already hit today ** [/!] [text]t_lasthit=[lookup db=codehit.db&lookinfield=ch_date&value=[date]&returnfield=ch_id¬found=NF] [showif [t_lasthit]=NF] < Run your code > [!] ** record hit ** [/!] [append db=codehit.db&autonumber=CH_ID]ch_date=[url][date][/url][/append] [/showif] [/then][/if]------------------------------------------------------------Then set up a trigger that fires every minute or so.. enough topass the initial condition a few times (for redundancy).Hope that helps to avoid future problems.Donovan-- Donovan BrookeEuca Design Center[Practical-Ethical-Efficient]www.euca.usegg.bzartglass-forum.com
Associated Messages, from the most recent to the oldest:
Hi Steve,As mentioned in the trigger admin:"The trigger will execute if it is enabled, and the NextExecute timeis earlier than the current time"My guess is that the NextExecute had passed while your server was having issues..Anyway,I don't like to rely on
triggers to run code at certain times.Instead, I wrap my code to be fired in a "time wrapper"..ie. (code to be ran once daily)-----------------------------------------------------------[if ({
[time]} < {sometime}) & ({
[time]} > {sometime})] [then]
[!] ** Some solution to know if already hit today ** [/!]
[text]t_lasthit=[lookup db=codehit.db&lookinfield=ch_date&value=
[date]&returnfield=ch_id¬found=NF] [showif [t_lasthit]=NF] < Run your code >
[!] ** record hit ** [/!] [append db=codehit.db&autonumber=CH_ID]ch_date=
[url][date][/url][/append] [/showif] [/then][/if]------------------------------------------------------------Then set up a trigger that fires every minute or so.. enough topass the initial condition a few times (for redundancy).Hope that helps to avoid future problems.Donovan-- Donovan BrookeEuca Design Center[Practical-Ethical-Efficient]www.euca.usegg.bzartglass-forum.com
Donovan Brooke
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Test (2004)
Notepad problems - SOLVED! (1998)
WebCommerce: Folder organization ? (1997)
nesting limits? (1998)
reserved characters for field names? (1998)
WCS Newbie question (1997)
Webcat Manual and TeaRoom Examples Uses Different Examples. (1997)
RE: Can a database get stomped by simultaneous access? (1997)
apostrophe in search item (1997)
sendmail spaces (1997)
itools webcat atartup (2000)
I have observed and I am gone. (1998)
3.0 [TEXT] variables (1998)
Shop from PDF (2004)
Problem with pull down menu (1998)
Plain tex spacing for html? (2003)
WCS Newbie question (1997)
pc (1997)
(1997)
WC Database Format (1997)