Jatin kacha's Blog

Schedule a task to call a web page using Task scheduler in windows

Posted on: January 21, 2011


One of the requirement during the maintenance for one of the project was to call a web page iteratively on a scheduled time.

I find one interesting article posting script how to run scheduled task to call a web page using task scheduler in windows.

All you have to do is save following script in a .vbs file, and schedule it to run on windows scheduler.

Here it is:

Call LogEntry()

Sub LogEntry()

‘Force the script to finish on an error.
On Error Resume Next

‘Declare variables
Dim objRequest

Set objRequest = CreateObject(“Microsoft.XMLHTTP”)

‘Put together the URL link appending the Variables.
URL = “http://localhost:82/image-sitemap-generator.aspx”

‘Open the HTTP request and pass the URL to the objRequest object
objRequest.open “POST”, URL , false

‘Send the HTML Request

‘Set the object to nothing
Set objRequest = Nothing

End Sub

You can find more detail from here for implementation of this:


2 Responses to "Schedule a task to call a web page using Task scheduler in windows"

This didnt work for me…I just get errors. I took this info, pasted it in a textfile, and renamed it with the .vbs extenstion…Im on Win 7…any thoughts?


Thanks for approaching me.
Well, this experiment went fine for me in windows XP machines + windows 2K3 server. I didnt try in win 7.

Will try and let you know.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

My tweets

%d bloggers like this: