Re: [WebDNA] Daily tasks without triggers

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 107193
interpreted = N
texte = Great idea Kenneth, thanks for sharing! Marc On 8/10/2011 6:10 AM, Kenneth Grome wrote: >> Hot stuff, this is a brilliant idea, why didnt I think of >> this. Thanks a bunch, this will allow me to figure out >> when something hasnt triggered that is supose to trigger. > > > I find that on most sites I have a good reason to run some > code once a day, but it really doesn't matter what time of > the day it runs. If you have the same need just put this > into your home page, or whatever other page gets at least > one visit per day: > > [showif [date]![include dailyTasksDate]] > your code goes here ... > [writefile dailyTasksDate][date][/writefile] > [/showif] > > This will insure that your code is run once a day, upon the > first page visit of the day, then it won't run again until > the first visit on the next day. No triggers required. > > To alert yourself that this code was run, just put this > inside the showif: > > [sendmail from=&to=&subject=Daily tasks: [time]][/sendmail] > > Or if you won't want a daily email just log the daily tasks > like this: > > [appendfile dailyTasksLog][date] [time] [ipaddress] > [/appendfile] > > If you're running lots of code it will speed things up by > putting it inside a separate "dailyTasks" file so that WebDNA > does not have to parse it all. This technique usually helps > in other places in the website too: > > [showif [date]![include dailyTasksDate]] > [include dailyTasks] > [writefile dailyTasksDate][date][/writefile] > [/showif] > > And if you're running code that takes a long time to run, > you can improve the page load speed for your first visitor of > the day with this technique: > > [showif [date]![include dailyTasksDate]] > [spawn] > [include dailyTasks] > [writefile dailyTasksDate][date][/writefile] > [/spawn] > [/showif] > > Sincerely, > Kenneth Grome > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list. > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us -- ------------------------------------------- Marc Thompson Software Engineer Media Solutions University Information Technology University of Utah 801.585.9264 marc.thompson@utah.edu ------------------------------------------- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Daily tasks without triggers (Marc Thompson 2011)
  2. [WebDNA] Daily tasks without triggers (Kenneth Grome 2011)
Great idea Kenneth, thanks for sharing! Marc On 8/10/2011 6:10 AM, Kenneth Grome wrote: >> Hot stuff, this is a brilliant idea, why didnt I think of >> this. Thanks a bunch, this will allow me to figure out >> when something hasnt triggered that is supose to trigger. > > > I find that on most sites I have a good reason to run some > code once a day, but it really doesn't matter what time of > the day it runs. If you have the same need just put this > into your home page, or whatever other page gets at least > one visit per day: > > [showif [date]![include dailyTasksDate]] > your code goes here ... > [writefile dailyTasksDate][date][/writefile] > [/showif] > > This will insure that your code is run once a day, upon the > first page visit of the day, then it won't run again until > the first visit on the next day. No triggers required. > > To alert yourself that this code was run, just put this > inside the showif: > > [sendmail from=&to=&subject=Daily tasks: [time]][/sendmail] > > Or if you won't want a daily email just log the daily tasks > like this: > > [appendfile dailyTasksLog][date] [time] [ipaddress] > [/appendfile] > > If you're running lots of code it will speed things up by > putting it inside a separate "dailyTasks" file so that WebDNA > does not have to parse it all. This technique usually helps > in other places in the website too: > > [showif [date]![include dailyTasksDate]] > [include dailyTasks] > [writefile dailyTasksDate][date][/writefile] > [/showif] > > And if you're running code that takes a long time to run, > you can improve the page load speed for your first visitor of > the day with this technique: > > [showif [date]![include dailyTasksDate]] > [spawn] > [include dailyTasks] > [writefile dailyTasksDate][date][/writefile] > [/spawn] > [/showif] > > Sincerely, > Kenneth Grome > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list. > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us -- ------------------------------------------- Marc Thompson Software Engineer Media Solutions University Information Technology University of Utah 801.585.9264 marc.thompson@utah.edu ------------------------------------------- Marc Thompson

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:

StoreBuilder Easily change a SKU (2004) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) RE: ShowNext Command (1997) PIXO (1997) Help formatting search results w/ table (1997) Running _every_ page through WebCat-error.html (1997) [WebDNA] How to go into old WebCatalog? (2009) [WebDNA] [OT] WebDNA Wiki - need grammar check / (2009) Problem (1997) test mail (2004) multi-paragraph fields (1997) [WebDNA] Search Site (2009) HELP..Changing Price after adding to cart. (1999) OH MY GOD! (1998) setting taxable to true (1997) No incentive ... (2000) no global [username] or [password] displayed ... (1997) CC Payment Processors (2007) Request Time Out (1997) WebCat2 beta 11 - new prefs ... (1997)