Solved

running a timed asp page

Posted on 2001-08-31
9
254 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
Industry Leaders: 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:
Silvers5 earned 200 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

691 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