timer facility in asp

Results 1 to 3 of 3

Thread: timer facility in asp

  1. #1
    Ritesh Guest

    Default timer facility in asp

    I want to know whether the following scenario is possible:<BR> <BR>On my website, users register to avail some free service for one month. I want to be able to send them email one week prior to the expiry date of their registration. Can I do this without any user-interaction (like that of administrator)?<BR> <BR>I want to write a code which keeps on executing itself in an endless loop. Please suggest some measures for it. <BR>

  2. #2
    Markkk Guest

    Default RE: timer facility in asp

    Use your global.asa file.<BR><BR>Creat a script in Session_OnStart to run once each day (not on every Session start!) This script would run a query of your database and determine which Accounts are due for their weekly email reminder. Send the email notices using CDO.<BR><BR>This of course requires that your site be hit at least once per day to trigger the Session_OnStart event. Even if it it isn&#039t hit each day, you could use an Application variable to store when the script was run last. If the script wasn&#039t run for 4 days, you could modify your database query accordingly.<BR><BR>I won&#039t write the script for you...but I am sure that you have enough ammunnition to get started.<BR><BR>I hope this helps!!

  3. #3
    Ritesh Guest

    Default RE: timer facility in asp

    Hi Markk,<BR>I understand your idea. But it requires that atleast one user should login each day (or maybe in 4 days).<BR>Now this is something which will happen and session_onstart can very well help, but I was trying to keep it independent of all interactions. Even if nobody logs on the site for any period of time, it should work.<BR>Thanks a lot.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts