Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 11th, 2005, 08:55 AM
Authorized User
Join Date: Jan 2005
Location: , , .
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default Automated tasks in ASP


I have written a web application in ASP that accesses an SQL Server 2000 database.

I need to make the application automatically recognise when the current date is a particular pre-specified date, and perform a function at that time (in this case, the function will grab some email addresses from the database and send an auto-generated email to them).

In other words, I need a way to make my application continually monitor the date/time (in the background), and then spring into action when the specified date arrives.

Please can you tell me how to do this?

I have searched the web a bit, but have not turned up anything (perhaps I am not using the best keywords in my search).

Hope you can help.


Reply With Quote
  #2 (permalink)  
Old May 12th, 2005, 09:52 AM
Friend of Wrox
Points: 410, Level: 7
Points: 410, Level: 7 Points: 410, Level: 7 Points: 410, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2004
Location: New Delhi, India.
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anubhav.kumar

Hi dear,

As far as i get you, you may want to generate some email messages based on a date criteria. Now in asp you cannot run a continuous loop in the background to check for dates etc.. because of stateless nature of web applications. instead you have to trap the events in your application to fire the codes for checking and generating emails. The best will be session events as they will occur frequently. The other obivous option is application level events.

Moreover you can create an include file having the code you want to execute for email and date check etc and include it at the top of all your asp pages. So it will execute with each request, even more frequent than session events. But it will slow down your application performance as well


Anubhav Kumar
Reply With Quote
  #3 (permalink)  
Old May 26th, 2005, 05:20 AM
Authorized User
Join Date: Jan 2005
Location: , , .
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts

Thank you, dear - but there must be a better way than that to do scheduled tasks...?

Can anyone else help me with this please?


Reply With Quote
  #4 (permalink)  
Old June 3rd, 2005, 01:52 PM
Friend of Wrox
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post


Why dont you write a vbscript that does this and add that in the OS scheduled task as a job, so that it runs once every day, and when it meets the required date, it should do what it is intended to. In ASP, AFAIK, You cannot do that. Instead you can write some application that runs as a service in windows to get this done. But for that you can't stick with ASP. If you are for it, you can try that with .Net to run as a service.

IMO, vbscript running as a scheduled job on windows should be the best bet to keep that simpler as fas as I understood your requirement.

Hope that helps.

- Vijay G
Strive for Perfection
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
execute membership validator after some tasks done Maxxim ASP.NET 2.0 Basics 8 February 15th, 2007 10:13 AM
Too many client tasks pbyers Classic ASP Databases 0 May 3rd, 2005 01:04 AM
Creating Scheduled Tasks from VB ckrystal VB How-To 0 December 31st, 2004 03:02 PM
Counting Tasks in "Task Report" twsinc Access 1 March 24th, 2004 09:40 AM
Counting Tasks in "Task Report" twsinc Access VBA 1 March 21st, 2004 06:27 PM

All times are GMT -4. The time now is 08:53 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.