khadem1386 Posted November 15, 2007 Share Posted November 15, 2007 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 More sharing options...
jesh Posted November 15, 2007 Share Posted November 15, 2007 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 More sharing options...
khadem1386 Posted November 16, 2007 Author Share Posted November 16, 2007 Can we make Scheduled task by ASP or ASPX ?I need a Timer that it band to Server CPU and run a page (after some minute) and then this page send mail for me.Thanks Link to comment Share on other sites More sharing options...
jesh Posted November 16, 2007 Share Posted November 16, 2007 You could use .NET to create a Windows Service that runs on some machine that has access to the database and have it be your scheduler.http://www.codeproject.com/dotnet/simplewindowsservice.asp Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.