Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 11th, 2005, 08:55 AM
Authorized User
 
Join Date: Jan 2005
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default Automated tasks in ASP

Hi,

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.

Thanks,

Steve
 
Old May 12th, 2005, 09:52 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anubhav.kumar
Default

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

cheers

Anubhav Kumar
 
Old May 26th, 2005, 05:20 AM
Authorized User
 
Join Date: Jan 2005
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Can anyone else help me with this please?

Thanks.

 
Old June 3rd, 2005, 01:52 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Steve,

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.
Cheers!

_________________________
- Vijay G
Strive for Perfection





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





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