Time based function trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Wilock
    New Member
    • Nov 2007
    • 1

    Time based function trigger

    How do I trigger a function based on time, or even once per day in ASP? I'm also using SQL Server 2005, so I'd be willing to entertain any ideas to pull this off that way too.
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    Originally posted by Wilock
    How do I trigger a function based on time, or even once per day in ASP? I'm also using SQL Server 2005, so I'd be willing to entertain any ideas to pull this off that way too.
    Just remember that ASP is limited in that it only runs while an ASP page is loading. One viable soluttion might be to tell it to do an action every time the page has loaded unless that action has already been done that day. The question is, how are you going to check whether that action has been done and how recently? If you have pretty steady visits, you could trust the data to an application-level variable,[code=asp]if datediff("dd", application("la stUpdate"), date()) > 1 then
    dailyUpdate
    application("la stUpdate") = date()
    end if[/code] but those are not that stable, so I would suggest saving that data in a text file (or XML file) or in a db. Let me know if that helps.

    Jared

    Comment

    Working...