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] "&" char in Flash animation (2006) Nested [SEARCH] and [REPLACE] problem. (1997) RED QUESTION MARKS AGAIN (1999) [WebDNA] fastcgi 7+ & [cart]? (2010) FORMS: Returning a specific page (1997) Virtual hosting and webcatNT (1997) WebCat2.0 [format thousands .0f] no go (1997) WebCatalog for guestbook ? (1997) Trouble creating a temp database (2000) [WebDNA] anybody installed on snow leopard (2009) Erotic Sites (1997) PCS Emailer's role ? (1997) WebCat2 several catalogs? (1997) Running _every_ page through WebCat ? (1997) WEBDNA chat (2002) [WebDNA] WebDNA development (2017) detecting if var is blank? (2007) ListFiles Bug (1998) [carts] and databases (1997) ConvertChars request (1999)