Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 scheduling execution of asp script
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 05 March 2002 :  19:04:41  Show Profile
Is there a way to schedule an execution of an asp script? For instance, let's say I want to remind a group of people of a meeting coming up the next day (or week or whatever). The meeting date would be stored in a database, along with the emails of the people scheduled for the meeting. I can handle the code to do the actual email, but timing the email is the problem. Any suggestions?

Nikkol

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 05 March 2002 :  21:44:25  Show Profile  Send ruirib a Yahoo! Message
I don't know how to do it resorting to a server script.

You could, however, create a batch file or a vbs file in a client running Windows, have that script execute Internet Explorer with the URL of the script you want to execute, and schedule the script with Windows Task Scheduler. It works, I've done it.

With WinXP (the current OS on my desktop) you can even have the script to wake the computer from hibernation. I don't know if this specific point (hibernation) is valid for other Windowses (2K, 98, ...), but you can shedule scripts on these OSes.

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 05 March 2002 :  22:00:01  Show Profile
Thanks ru. So with doing the scheduler thing to open IE to a specific URL, I could just make an asp file that would look at the database check to see if there were any meeting coming up in the next week let's say. If there were, then email the people scheduled for that meeting. I would need another field in the database ... something like EmailNotification (boolean) that would be checked too to see if the email had already been sent or not. Might actually need an email notification field for each person in case someone signed up late. How's that sound? Do-able?

Nikkol
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 05 March 2002 :  22:45:35  Show Profile  Send ruirib a Yahoo! Message
quote:

Thanks ru.


Sorry, it looks weird seeing a reference to me as ru. My name is Rui. Obviously I didn't expect you to know that .
quote:

So with doing the scheduler thing to open IE to a specific URL, I could just make an asp file that would look at the database check to see if there were any meeting coming up in the next week let's say. If there were, then email the people scheduled for that meeting. I would need another field in the database ... something like EmailNotification (boolean) that would be checked too to see if the email had already been sent or not. Might actually need an email notification field for each person in case someone signed up late.


I'd probably create a table associating a given meeting with the ID's of the people already notified. But I guess that's what you meant...
quote:

How's that sound? Do-able?


Sure. I see no major difficulties.


Ok, now a big question.
Why do this with ASP at a Web server? I'd probably do this using VBA programming in Outlook and connect from Outlook to an Access database using ADO (or maybe the other way around because I can have Access scheduled to open and run DB, and have that DB execute a piece of VBA code on startup, but I do not know how to force Outlook to execute code automatically when it opens).

Obviously you'd need to use Outlook as a email client, but it would be a more natural option for the job. Using Outlook you could even look at the calendar and get the meeting info from there.
How does this sound?


-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 05 March 2002 :  23:11:25  Show Profile
quote:

Sorry, it looks weird seeing a reference to me as ru. My name is Rui. Obviously I didn't expect you to know that .


Many apologizes. Lazy fingers you know
quote:

Ok, now a big question.
Why do this with ASP at a Web server?


Well, partly, I was just wondering. I have an Access code that is already on a Scheduler (not for this sort of thing) and uses JMail to email out the results. The meeting thing was just an example. What I'm really contemplating is an interface for people to sign up for training sessions and then they get emailed a reminder when the the training is a few days away. I guess I could do the same kinda thing just schedule the Access DB to open, run a script on the records in the db, eh? What happens if you open a database like that and someone tries to get to it on the web when you have it open?

Nikkol
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 05 March 2002 :  23:17:42  Show Profile
Here some info on scheduling asp scripts:
http://www.asp101.com/articles/john/schedule/default.asp

«-------------------------------------------------»
Read the Do's and Don'ts before you post for help
«-------------------------------------------------»
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 05 March 2002 :  23:21:21  Show Profile  Send ruirib a Yahoo! Message
quote:

Many apologizes. Lazy fingers you know


No hard feelings .
quote:

What happens if you open a database like that and someone tries to get to it on the web when you have it open?


Access can handle simultaneous users. I don't see much of a problem there.

Do you run this Web site from your computer or do you plan to use the DB and the scheduling thing on the Web server?


-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 05 March 2002 :  23:25:53  Show Profile
6 of one, half-dozen of the other. I was thinking of just setting up the scheduler on my workstation, which stays on all the time anyway. The webserver is just 10 feet from my workstation. So, whatever. Why do you ask?

Davio - thanks for the links...good info.

Nikkol
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 05 March 2002 :  23:36:10  Show Profile  Send ruirib a Yahoo! Message
quote:

Why do you ask?



Curious, that's all .
I was just wondering how you'd deal with the DB: have it on the Web server and a copy (out of synch) on your machine, maybe. But I guess with that setup you can just have it at the Web server and schedule it from there also...
quote:

Davio - thanks for the links...good info.



Yes Davio, good link. The "final" solution is an elegant one. If you wanted to go for the ASP script solution, Nikkol, that would be an elegant one ...

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07