Solved

running a timed asp page

Posted on 2001-08-31
9
246 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
 
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now