Jump to content

Use Timer in server side


khadem1386

Recommended Posts

Hi to allI have an email sender for my registry page in my site.this page must send email tow time:1. immedeatly after registring.2. and after 20 minute. How can I use ASP or ASP.net for calling a sub or function after 20 minute (automaticly)?I can use setTimeout in client Side script (VBSCRIPT).But can we make such this, in server side?

<script language = "VBScript">	Dim dtmStartTime ,k	Sub Test	k = K + 2	 document.ee.T1.value = k		idTimer = window.setTimeout("Test", 2000, "VBScript")	End Sub  </script>

Thanks

Link to comment
Share on other sites

I would probably approach this like the following:1) Send first email immediately.2) Record in a database that another email needs to be sent at a certain time in the future.3) Have some scheduled task, or SQL Server Agent, cronjob, etc running at regular intervals which would check for any records in the database for emails that are due, or passed due, for being sent.4) Have the scheduled task, SQL Server Agent, etc, send those emails.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...