Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2223
  • Last Modified:

Windows Task Scheduler - Open Specific Webpage

Hello,

Could someone advise me on how I can set up task scheduler (step by step) to open a specific web page.  I need this to be done at a certain time each day and then for the opposite - i.e. web page closed - to be done at a set interval.  I have used task scheduler and it seems intuitive if you only need an application opened - but not sure how I would specify exact location to be opened.

Kind Regards,
Raheel
0
hennanra3
Asked:
hennanra3
  • 5
  • 3
  • 3
  • +1
3 Solutions
 
Michel PlungjanIT ExpertCommented:
this works for me in win2K

"C:\Program Files\Internet Explorer\iexplore" http://www.cnn.com/
0
 
Michel PlungjanIT ExpertCommented:
0
 
remeshkCommented:
Go to control panel --> open the Scheduled Task ---> Select Add Scheduled Task -- > Choose application from the list " Internet Explorer " -----> Choose Daily ---> Specify the time --> user password ----> Enable tick mark to Open advanced properties for task when I click Finish ----> Task menu ---> Run : C:\PROGRA~1\INTERN~1\IEXPLORE.EXE "Add your site name here "   
Eg  : C:\PROGRA~1\INTERN~1\IEXPLORE.EXE "http://google.com"  .

Good Luck
0
Industry Leaders: 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!

 
Michel PlungjanIT ExpertCommented:
And how to close it again?
0
 
hennanra3Author Commented:
Hi,

Thanks mplungjan - the opening part worked.  Yes, good point re closing - any ideas?

Mereshk - thanks for clarification - that part I already understood - it was just the URL string I really needed.

I don't think the scheduling tool is necessary for my requirements - I'm almost there using task scheduler and the features of that are too excessive for what I need.  

Regards,
Raheel
0
 
Michel PlungjanIT ExpertCommented:
0
 
hennanra3Author Commented:
Hi - yep but after the trial period it requires purchase of software - I want a free solution :-)
0
 
LeeKowalkowskiCommented:
I'm sure you can use a local frameset to display the page, use the windows scheduler to display it, and the close command can go in the local frameset.  

If the close command absolutely must come from the scheduler too, then you can put the frameset non-local and use a URI parameter to signal this, and use AJAX to communicate the close to a central server to signal that a close has been issued.  For which the original frameset would be polling at regular intervals.  Overkill?  I think maybe.

--
Lee
0
 
hennanra3Author Commented:
Just a bit :-) - any ideas of any rival task scheduling tools that are cheaper as even a single license of the above is pretty pricey.
0
 
Michel PlungjanIT ExpertCommented:
Google is your friend. I do not know any of them anyway
0
 
LeeKowalkowskiCommented:
I have cracked the "close from scheduler without using a central server" requirement if you're interested.

Step 1.  Launch page needs to be a local file (e.g. whatever.html), which is a frameset like this:

  <frameset cols="0,*">
    <frame src="checkClose.html">
    <frame src="http://www.example.com/yourSpecificPage.html">
  </frameset>

Step 2. So, your page opens in this frameset, the checkClose.html needs to be in the same directory as whatever.html, and is this:

  <script type="text/javascript">
    if(location.hash == "#close")
    {
      document.cookie = "close=true;path=/;expires=" + new Date((new Date() - -2000)).toGMTString() +  ";";
      window.opener = null;
      window.close();
    }
    else
    {
      top.status = new Date() + document.cookie;
      if(document.cookie != '')
      {
        top.opener = null;
        top.close();
      }

      setTimeout("location.reload()", 1000);
    }
  </script>

Step 3. You can then point your start task to: iexplore file:///c:/whatever.html and your end task to iexplore file:///c:/checkClose.html#close

When you open checkClose.html#close, that page will close immediately, but set a cookie to tell the other page to close too.

The intervals I used in the example are a bit short, you can increase them to better suit your scenario.  In theory the cookie can live for the same duration as the reload interval, but I've added a second to the cookie life just to make sure.

--
Lee
0
 
LeeKowalkowskiCommented:
Oh, you can remove the line: top.status = new Date() + document.cookie; - that was just me testing it.

--
Lee
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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