Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

running a timed asp page

Posted on 2001-08-31
9
Medium Priority
?
258 Views
Last Modified: 2012-08-13
I am trying to build an ASP page that runs every so often (say hourly or once a day) that pulls pertinent information from a database and generates an email with that information.  I can't seem to find what I am looking for.  It looks like I can use the Windows Scripting Host but I don't want browser windows opening if possible.  I'm not real sure where to start.

Can anyone help?
Thanks,
Matt
0
Comment
Question by:mholocher
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +3
9 Comments
 
LVL 5

Expert Comment

by:raizon
ID: 6446317
I would create a VB app that ran my query and sent the email instead of an ASP page.  Then set that vb app up as a service in NT.
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6446319
0
 

Author Comment

by:mholocher
ID: 6446333
I've have already read the 4Guys from Rolla information and it really wasn't what I was looking for.

As far as the VB app, what if I didn't have access to the actual server.  Say it was hosted at some hosting company somewhere.  Isn't there some other way to do it?

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 28

Expert Comment

by:AzraSound
ID: 6446356
Not what youre looking for b/c you dont have access to the server?  Then you will be limited...there are some shady workarounds like this:

http://www.powerasp.com/content/hintstips/schedule-global.asp
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6446365
You can use the Javascript 'setTimeOut()' function to run a page every so often;

<body onLoad="setTimeout('reDoPage()',600000)">

function reDoPage() {

window.location.reload(true);
}
0
 
LVL 10

Expert Comment

by:makerp
ID: 6447386
easy, simply have an asp page on the server that does the task then write a simple app that requests a web page using HTTP (set it request the web page that does you job). run this app on a machine you have control over. to schedule the local app us either the win98 scheduler or AT command on NT
0
 
LVL 10

Expert Comment

by:makerp
ID: 6447388
if you only have a PC at home and dont want to be dialed up all the time then your program will have to do the following

Dialup using the RAS API
request the page
Drop the connection

you could do all of this in C++ or WSH with the appropriate components
0
 
LVL 20

Accepted Solution

by:
Michel Sakr earned 600 total points
ID: 6449702

How do I schedule ASP files?


Use the AT command and Windows Scripting Host to schedule a VBS file at certain intervals.
 
First, change the ASP to a VBS file. This is accomplished by (1) changing the extension to VBS; (2) changing all server.createobject calls to createobject; and, (3) removing all <%%> delimiters and any browser-destined code (for example, response.write statement or client-side HTML). I didn't run into any further complications, but YMMV.
 
You store the VBS file in the filesystem, and use the AT command to schedule it (this actually schedules its execution with NT's schedule service). At a command prompt, you can use AT by itself to see a list of tasks currently in the schedule. You can use AT /? to find out all its syntax possibilities.
 
For example, to get a file to run every weekday at 9:00 am, I launch this batch file (the first line clears existing entries):
 
    at /delete /y
    at 9:00 /every:m,t,w,th,f d:\net\shared\getdata.vbs
 
 
 
Notice there is no web server involved; the file is accessed directly through the file system. Once I got over the "a user has to be logged in" and "the tasks have to be reset when rebooted" hurdles (both of which I believe are problems with the particular machine that is not under our control), all has been running fine for me.
 

Kris Eiben suggests: If it's a high-traffic site, you might also be able to put something in session_OnStart, using an application variable with the last time the function was run and checking to see if the right amount of time has passed.
 

Build an ASP page and leave a browser open on the machine, with a <meta> refresh (ultimate kludge).



from aspfaq.com
0
 

Author Comment

by:mholocher
ID: 7438475
I decreased the point total because in one of my comments I stated that I didn't have control over the machine where the site is hosted.  I am giving the points based on the effort that was given to answer the question.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question