How to autorun an ASP script


I have an ASP site (MS Access DB) that allows the users to add events to a calendar and ask the calendar to send an email when the event is coming up.  I do not have access to the server except for FTP.  Is there a script I can write that will automatically run an ASP page once a day?

Thank you!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lee W, MVPTechnology and Business Process AdvisorCommented:
Write a web page that does this on load.  Then setup a Scheduled task on your PC to run an instance of Internet Explorer to load the page.
[With Courtesy of Silvers5]

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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

You can also try the Windows Scheduler
you could query the databse with a recordset and use an IF statement to response.redirect when an event occurs:

SQL = "SELECT * FROM events WHERE event <=(date()+5)" sql, conn

If NOT rs.eof Then
       response.redirect "Emailpage.asp"
End IF

this way if any events are picked up where the date of the event is withing the next 5 days it will redirect to the page you want.  Is this anything near what you are looking for?
This is assuming you are using a database to hold the event dates
GqbedAuthor Commented:
Sorry for the delayed response.

hongjun, your answer about the AT seems to be what I need, however, I do not totally have a grasp on the concept.  I understand the changing to vbs, no problem there.  Its the AT command portion I don't follow.  I will look for more information on it, but if you could provide more I would really appreciate it!

I can not use windows scheduler b/c I can only FTP up to the server and the server is not in my possession.  

Thanks for all the help!
GqbedAuthor Commented:
I totally skipped over the "run a batch file" portion of the accepted answer.  So yes, I do know what to do and it is exactly what I was looking for.  Thank you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.