View Full Version : Automate asp script

Gary Williams
07-21-2004, 01:45 PM
Hi all,

I have a simple script that I call manually to read an access database and report back a few totals.

What would be useful would be to have the script run automatically at 11.59pm every day and append each days totals to a text file which I can download manually into a spreadsheet when I need to.

I have read through some of the automation tutorials but these are still a bit beyond me to modify to suit eventhough I can now follow the logic.

Any ideas?



07-21-2004, 01:55 PM
The easiest thing I can think of is making a batch file that executes the script and pipes the output onto the text file, and using the Windows scheduler to run it.


07-21-2004, 03:23 PM
i do this alot at work to run reports,
best thing to do is convert your code to .vbs,
**** can be run right from your desktop, and can be scheduled with Windows Scheduled Tasks ( in control panel ) to run whenever you want..

if you need any help converting the code just post it here,
also you will need to create a system dsn to connect to the sql server or access data base, since dsn-less only works through iis..

hope this helps.

07-22-2004, 01:43 AM
Well, if you need your code to run to keep reports at an EXACT time everyday, then you will need some sort of timer program to either open up explorer and go to a specific address, run a batch file, or a vbs file.

But if you don't need to be completly accurate with your time, you can have users run the script for you.

Example of this would be to keep a database table with date & time, and a boolean for when the script was executed.

So everytime a user shows up, and time = 11:59PM to 12:30AM you check the database to see if the script has been ran. If boolean = false then you run the script, or else, you don't run the script.
Now the user doesn't even have to know they are running the script at all, you just do it while the page is loading, and once it's done, it's done!

Make sence?

I don't know if this is the best method for you, but you can think about it.

07-22-2004, 04:28 AM
Easy thing to do

Download a program that schedules tasks.

Have it open up your browser
Have the homepage set to the webpage
The report is run.

Something like this might help: http://www.softpedia.com/public/cat/13/11/13-11-86.shtml

Have not tried to program, came up on google...

Gary Williams
07-22-2004, 07:31 AM
Hi Everyone,

Thanks for all the replies and apoligies for omitting one small, but vital, fact. The database is on my web server, not my local PC. So I need to place the automated task on the server and just ftp down the resulting text file as and when I need it.

My own PC I close down each night so I can't have the task running from there.

Sorry for the confusion.



07-22-2004, 10:15 AM
On the server that you have the web server, can you have an exe run?

Gary Williams
07-22-2004, 10:52 AM
Hi Morgoth,

Yes, I can.


07-22-2004, 12:15 PM
So you can easily find and download a program to run this report generator, make one, or have someone make one for you.
And running the exe should be no problem, as long as you can run the exe on the web server computer.