468,110 Members | 1,921 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,110 developers. It's quick & easy.

Execute ASP or ASP.Net page or code at specified time interval

I've never found a simple answer to this yet it must be an issue for a lot of
web applications.

Basically I want to execute code in a web application at a specific time
and/or intervals (like daily at 2:00 AM).
I want this to happen regardles of whether a user is accessing the
application.

Some years ago I solved a particular instance of this issue by setting up a
Scheduled Task. The task used a command line to launch IE without an
interface and passed the URL of an ASP page as a parameter. The ASP page
contained the code I wanted to run, which ran, and then IE was closed. I
don't remember whether the ASP closed IE or the Scheduled Task did. A bit
crude I suppose but it worked just fine.
Trouble is I've lost the command I Scheduled and I can't remember the
syntax. I've tried to find IE command line syntax again but with no success.

If anyone knows what that syntax would be then I'd be grateful. I've done
numerous earches for IE comand line syntax but not turned up anything useful
- where on earth is it?

More generally is there a better way to achieve the objective? Some of my
applications are hosted by ISPs rather than being intranet based. Scheduled
Tasks aren't an option there.

Can something be set up in the ApplicationOnstart event? Would it be safe to
do?

--
Thanks

Grant Ord
Jul 22 '05 #1
3 5944
Try http://www.webcron.org/index.php?&lang=en

Patrice

--

"Grant Ord" <gr*******@nospam.nospam> a écrit dans le message de
news:8B**********************************@microsof t.com...
I've never found a simple answer to this yet it must be an issue for a lot of web applications.

Basically I want to execute code in a web application at a specific time
and/or intervals (like daily at 2:00 AM).
I want this to happen regardles of whether a user is accessing the
application.

Some years ago I solved a particular instance of this issue by setting up a Scheduled Task. The task used a command line to launch IE without an
interface and passed the URL of an ASP page as a parameter. The ASP page
contained the code I wanted to run, which ran, and then IE was closed. I
don't remember whether the ASP closed IE or the Scheduled Task did. A bit
crude I suppose but it worked just fine.
Trouble is I've lost the command I Scheduled and I can't remember the
syntax. I've tried to find IE command line syntax again but with no success.
If anyone knows what that syntax would be then I'd be grateful. I've done
numerous earches for IE comand line syntax but not turned up anything useful - where on earth is it?

More generally is there a better way to achieve the objective? Some of my
applications are hosted by ISPs rather than being intranet based. Scheduled Tasks aren't an option there.

Can something be set up in the ApplicationOnstart event? Would it be safe to do?

--
Thanks

Grant Ord

Jul 22 '05 #2
Gazing into my crystal ball I observed =?Utf-8?B?R3JhbnQgT3Jk?=
<gr*******@nospam.nospam> writing in
news:8B**********************************@microsof t.com:
I've never found a simple answer to this yet it must be an issue for a
lot of web applications.

Basically I want to execute code in a web application at a specific
time and/or intervals (like daily at 2:00 AM).
I want this to happen regardles of whether a user is accessing the
application.

Some years ago I solved a particular instance of this issue by setting
up a Scheduled Task. The task used a command line to launch IE without
an interface and passed the URL of an ASP page as a parameter. The ASP
page contained the code I wanted to run, which ran, and then IE was
closed. I don't remember whether the ASP closed IE or the Scheduled
Task did. A bit crude I suppose but it worked just fine.
Trouble is I've lost the command I Scheduled and I can't remember the
syntax. I've tried to find IE command line syntax again but with no
success.

If anyone knows what that syntax would be then I'd be grateful. I've
done numerous earches for IE comand line syntax but not turned up
anything useful - where on earth is it?

More generally is there a better way to achieve the objective? Some of
my applications are hosted by ISPs rather than being intranet based.
Scheduled Tasks aren't an option there.

Can something be set up in the ApplicationOnstart event? Would it be
safe to do?


1. Get to the desktop
2. Rightclick and choose create shortcut
3. Type in the URL and save it
4. Open up Task Scheduler
5. Browse for the shortcut you put on your desktop
6. Do the scheduling, save it and exit.

This will work for any URL. May not be the best, but it works for me.
--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #3
Adrienne wrote on 12 mei 2005 in microsoft.public.inetserver.asp.general:
Can something be set up in the ApplicationOnstart event? Would it be
safe to do?


1. Get to the desktop
2. Rightclick and choose create shortcut
3. Type in the URL and save it
4. Open up Task Scheduler
5. Browse for the shortcut you put on your desktop
6. Do the scheduling, save it and exit.

This will work for any URL. May not be the best, but it works for me.

=========== getTheUrl.vbs =========

With CreateObject("MSXML2.XMLHTTP")
.open "GET", "http://www.myOrg.org/blah/myAsp.asp", False
.send
' WScript.Echo .responseText
' un-remark the above if you want to read rendered content
End With

====================================

And schedule this getTheUrl.vbs file
[never tried that, btw]

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Willem | last post: by
16 posts views Thread by Jason | last post: by
143 posts views Thread by suri | last post: by
10 posts views Thread by SStory | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.