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:

WebCommerce: Folder organization ? (1997) Swear words (2002) WebCat2b13 Command Reference Doc error (1997) help with writefile (1998) Rhapsody? (1997) Workaround for Emailer doubled bcc messages (1998) WebCat2final1 crashes (1997) WebCat2.0 [format thousands .0f] no go (1997) Quickie question on the email templates (1997) Search in 2 or more catalogs (1997) A little syntax help (1997) a search based on ^(contains) (1998) autocommit problem (1998) Simple way to create unique SKU (1997) [WebDNA] Need to convert unix date? (2009) Grep -- remove extra returns first (2003) Re:Dumb Question about Docs (1997) Odd (2001) HTML Editors (1997) WC2b15 File Corruption (1997)