Solved

running a timed asp page

Posted on 2001-08-31
9
250 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
  • 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

809 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