[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1703
  • Last Modified:

schedule a task for internet explorer to visit a webpage throughout the day

using windows server 2008

is this possible

would the
.exe file be iexplorer.exe
and the variable be www.webpage.com
  • 3
  • 3
1 Solution
Should be able to just run the task to open from "C:\Program Files\Internet Explorer\" to launch iexplore.exe and hit the web page. Here is the site that will allow you to do that running a script to call upon IE to open the page



Just simply create a task from schedule task and give it this parameter to run
"C:\Program Files\Internet Explorer\iexplore" http://www.webpage.com/
Make sure that iexplorer path is correct as per Windows 2008.

The above is the simple method, but the best method which for running certain webpages we personally use Wget for Windows, also works with Windows 2008

Faraz H. Khan
rgb192Author Commented:
windows server 2008

how do i find a program that will do this

not sure if i have vb
not sure how to use vb... where is it

One frequent question I see in the newsgroups is "How do I schedule a task to run in IIS?   This article discusses one technique using a VBS Script and Windows Task Scheduler.    Using Windows Task scheduler allows custom jobs to execute without having to stay logged into a server.    You can use this technique to request web pages frequently on a timed basis.  This keeps the page in-memory providing a better performance.   This could also request web pages to perform other administrative tasks.  

Here are steps to get started.

Write your VBS Script
Develop the webpage to process the HTTP Request
Create / Add table to database to track logging
Schedule the VBS Script
Write your VBS script

The script makes an HTTP request to a webpage on a timed basis.  (I.E. every 5 minutes).

Call LogEntry()

Sub LogEntry()

        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/track.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
Track.aspx webpage

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="tracklog.aspx.vb" Inherits="Tracklog" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">
    <title>Log Page</title>


<form id="form1" runat="server">





Tracklog.aspx.vb code behind

Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration

Partial Class Tracklog

    Inherits System.Web.UI.Page

        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Put your code in that would process when Track.aspx is requested
       Response.write(Track.aspx was called: & System.DateTime.Now())

       End Sub

End Class

Open in new window

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

I think you are confusing VB script as if it were an application. It's not. It's a scripting language that is built into the Windows OS. Looks like you have your VB file (which is a .vbs extension). You can test it by just running it by double clicking the file to make sure your syntax and everything is right (your file looks good but I'm no VB expert, just put your website in where the domain.com fields are present)...

From there just save the file off to a safe location and use task scheduler to run the .vbs file from that location. Once you do that, you can set the scheduling interval in task scheduler to run daily or y0ou can set the refresh interval in the script once the browser window is open...
rgb192Author Commented:
could i save this program as program.vbs
and run using cmd.exe
rgb192Author Commented:
You can but task scheduler eliminates that extra step by running the file from said location. If you use task scheduler to call upon C:\Windows\System32\cmd.exe and then cd to C:\Location of VB script file, you are adding extra (un necessary) steps to your task.

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now