How To Setup Windows Scheduled Task To Access a Web Page (.htm, .asp, .aspx, ...) Periodically?

Problem

Sometimes you need to access a web page periodically in your Windows 2008/2003 server.

Solution

You can write a .vbs script file and schedule it as Windows task (CScript C:\YourScript.vbs //H:CScript).

YourScript.vbs

        Call Send_HTTP_Request()

        Sub Send_HTTP_Request()

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

                'Declare variables
                Dim objRequest
                Dim URL

                Set objRequest = CreateObject("Microsoft.XMLHTTP")

                'Put together the URL link appending the Variables.
                URL = "http://www.yourdomain.com/your_page.aspx"

                'Open the HTTP request and pass the URL to the objRequest object
                objRequest.open "POST", URL , false

                'Send the HTML Request
                objRequest.Send

                'Set the object to nothing
                Set objRequest = Nothing

        End Sub
    

Navigator

Other Knowledgebase Articles

Shared Hosting

# of Domains: 2
# of SQL Server Databases: 2
Disk Space: Unlimited
Bandwidth: Unlimited
Email: Unlimited
SQL Server 2008 R2
Monthly: $4.99
More Information About Unlimited Shared Windows Hosting Plan

Windows Hyper-V Server

Dedicated Memory:2GB
Disk Space: 200GB
Bandwidth: Unlimited
Windows 2008/2003: Free
Monthly: $49.99
More Information About Unlimited Windows Hyper-V Server

Dedicated Windows Server

CPU: Intel Dual-Core Sandy Bridge I3-2100
RAM: 8GB RAM
Disk: 2x320GB SATA
RAID: Host RAID 1
Bandwidth: Unlimited
Windows 2008/2003: Free
Monthly: $99.00
More Information About Unlimited Dedicated Windows Server