Schedule aspx pages

A

Anonymous

Does anybody know how I can schedule aspx pages so that
they run few times a day?

Thanks
 
L

Lau Lei Cheong

Just insert some javascript set to set timeout, or simply add a http refresh
meta tag on it.
 
J

Jeffrey Palermo [MCP]

Anonymous,
Web pages aren't meant to be scheduled processes. For this, you should
write a regular windows or console app and build it into an exe. Then use
the windows scheduler to schedule when you want it to run.

Best regards,
Jeffrey Palermo
 
J

jongalloway

I think there are cases where it makes sense to hit a web page on a
regular basis. You might want to refresh an ASP.NET cache, or call a
webservice.

Here's one way to do it:
http://weblogs.asp.net/jgalloway/archive/2003/08/06/22793.aspx

Basically, create a VBS file and schedule it in the Task Scheduler:
Set oServerXML = CreateObject("Msxml2.ServerXMLHTTP")
oServerXML.Open
"GET","http://localhost/wsPDF/Pdf.asmx/CreateFromQueue?", False
oServerXML.setRequestHeader
"Content-Type","application/x-www-form-urlencoded"
oServerXML.send
Set oServerXML = nothing

This could also be done in a console app, which would be more "pure"
..NET, but I think this is simpler and thus easier to support.

You can also run a timer in Global.asax:
http://weblogs.asp.net/ashben/archive/2003/10/11/31579.aspx
- Jon
http://weblogs.asp.net/jgalloway
 
W

wl

ColdFusion has a CF_SCHEDULE tage, ASP(.NET) has not...


There are a few options:
- as stated below: write a .VBS script for example that does the "hitting"
and schedule this using the taskscheduler: either on the server itself or
remote (if your website is hosted and your hosting provider is not willing
to schedule this job).
- in the last case: you can also use any of the website monitoring tools
(some of them are free) and make sure they hit the ASP.NET pageyou want to
be scheduled.

Wim
 
K

Kevin Spencer

Whose browser do you want to schedule them to run on?

Better yet, what are you trying to accomplish with this? Chances are, this
is NOT the way to accomplish it.

ASP.Net is a full-service technology. You don't have to do the same type of
workarounds with it that you may have had to with ASP. So, if you can tell
us your business requirement, we can suggest workable solutions.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top