Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms 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 March 16th, 2004, 03:44 AM
Authorized User
 
Join Date: Mar 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default countdown timer in asp

i am working on a customer care project with ASP (VB script) as the front end & MS SQL server as the back end

i am getting complaints from users which i will assign to engineers
i want to start a countdown timer on hitting a button based on the priority....ie. i set the level of a particular record & press the save button....if the level is 1, then a countdown timer of 15 minutes should be started & when the timer reaches 0, an email should be generated & sent to me & another user that i will specify.
for level 2, timer should be 45 minutes & for level 3, it should be 180 minutes
how would this be done???

i want the provision for being able to run multiple timers concurrently
 
Old March 16th, 2004, 12:25 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I'm going to make a bunch of assumptions because you haven't been real specific with what you're describing. (The application is the complaint reporting application?)

I'm assuming these complaints are getting stored as table entries in the database, and you want email notification when a particular complaint "expires". So you save the complaint when it's created and tag it with an expiration datetime based on its level (Now + x minutes).

The best approach is to create an MS-SQL DTS job that pulls all the expired records and handles the emailing. You could right some of it in VB/Script within the DTS job, or have the DTS job fire off something that handles it. Schedule the job to run every minute.

Alternatively, you could write a regular console application (in VB if you so choose) that pulls the applicable data and handles the emailing. Use the operating system scheduler for scheduling.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old March 18th, 2004, 05:24 AM
Authorized User
 
Join Date: Mar 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

About the email notification, what i actually want done is quite similar to what you have figured out. Every 'complaint' is given a priority level and based upon it the engineer is supposed to fix the problem.
What i want is that once the prescribed time for a given 'complaint' expires, an email is sent from the server end( sql server) to the relevant people, in this case it should be sent to the coordinator( who forwards the complaint to an engineer) and the user who logged in the complaint.
How i figured this would work was by implementing a countdown timer for every priority level, at the timeout of which the email is triggered by the server, automatically.
What i havent been able to figure out is how to implement the timer and connect it to the email trigger or even if its going to work like that at all. Could u please help me in this and also if you could please tell me what exactly needs to be done to set up an email service e.g what email component to use, how to configure it etc.

i am racing against time and all help in this matter would be greatly appreciated.!!!

thanks!!!
 
Old March 21st, 2004, 07:29 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The point I was making remains, you need to determine where the "timer" will live. You have to use something that can either run a timer or something that will check periodically to determine if the expiration timestamp has been reached. Your interface to this application is an ASP application. You can't use something in that application to act as a timer because a web application just doesn't work that way because of the stateless, request-response design of web applications.

Given that you are running MS-SQL server, you can use its resources to perform this "timeout" operation. As I explained above, you can use a DTS job that runs at some time interval (every minute?) to check for expired complaints. DTS has an email task. I'm not a DTS expert so I can't really give you much more info than that. Look at the sql books online for information about creating a DTS job, scheduling it and how to put the necessary tasks into it.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Countdown timer DennyLoi Javascript How-To 2 November 27th, 2007 08:01 AM
Countdown Timer stalkingbutler Access VBA 2 April 16th, 2007 10:44 AM
Creating countdown timer takwirira ASP.NET 1.x and 2.0 Application Design 1 March 19th, 2007 09:51 PM
Countdown timer ashik112 Classic ASP Basics 1 February 25th, 2007 07:09 PM
Countdown Timer loveperson Beginning VB 6 1 January 7th, 2005 05:31 PM





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