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 time is 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 to pass the initial condition a few times (for redundancy). Hope that helps to avoid future problems. Donovan -- Donovan Brooke Euca Design Center [Practical-Ethical-Efficient] www.euca.us egg.bz artglass-forum.com Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] triggers executed at boot instead of scheduled time ( 2011)
  2. Re: [WebDNA] triggers executed at boot instead of scheduled time (Steve Raslevich - Northern Sound 2011)
  3. Re: [WebDNA] triggers executed at boot instead of scheduled time (Donovan Brooke 2011)
  4. [WebDNA] triggers executed at boot instead of scheduled time (Steve Raslevich - Northern Sound 2011)
Hi Steve, As mentioned in the trigger admin: "The trigger will execute if it is enabled, and the NextExecute time is 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 to pass the initial condition a few times (for redundancy). Hope that helps to avoid future problems. Donovan -- Donovan Brooke Euca Design Center [Practical-Ethical-Efficient] www.euca.us egg.bz artglass-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:

[OT] Read and weep (2003) NT [delete] (1998) cybercash on OSX - was Executing remote AppleScript (2000) WebCatalog can't find database (1997) syntax question, not in online refernce (1997) Database Options (1997) Sort Order on a page search (1997) default value from Lookup (was Grant, please help me) (1997) FREE Web Server Monitor FREE (1997) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) Cleaner URLs (2003) WebCatalog 2.1 License for Sale (1998) Large databases in WebCat (1997) Document Contains No Data (1998) Record size (1998) Image Upload and Auto Resize? (2003) Urgent Help needed (1998) Mime Headers for Mail (1998) using showpage and showcart commands (1996) Whats up with emailer? (1998)