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

x
?
Solved

Scheduled Task to run a url

Posted on 2012-08-21
6
Medium Priority
?
1,727 Views
Last Modified: 2012-08-22
Hi.  I am running a server 2008 r2 server and I would like to use a scheduled task in windows to run a URL every 5 minutes.  Does anyone have any idea how to do this?

This is the URL that I woudl like to run:

http://something.com/public/index.php?path_info=frequently&code=4gGJR

Wes
0
Comment
Question by:hmcnasty
6 Comments
 
LVL 22

Accepted Solution

by:
Ivano Viola earned 1000 total points
ID: 38318835
I would create a scheduled task that ran daily and repeated every 5 minutes. The task would run a program point it to a vbscript that opened the required webpage. Copy and paste the following code into a text file and rename it with a .vbs extension. I tested this method and works well.

CreateObject("WScript.Shell").Run("http://something.com/public/index.php?path_info=frequently&code=4gGJR")

Here is a tutorial on creating a scheduled task:
http://www.7tutorials.com/advanced-users-task-creation-task-scheduler

IV
0
 
LVL 16

Assisted Solution

by:Brian Pringle
Brian Pringle earned 1000 total points
ID: 38318846
You can create a scheduled task to run the following, which could be a batch file

start "C:\Program Files\Internet Explorer\iexplore.exe" http://something.com/public/index.php?path_info=frequently&code=4gGJR
0
 

Author Comment

by:hmcnasty
ID: 38318912
Thanks fellas, both worked perfectly.  Here's the catch how do I close it or just keep refreshing the browser after the task runs?  Right now it would just keep opening browser windows or tabs.  Since it runs every 5 min or so I need to find a way to close it after.

wes
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 16

Expert Comment

by:Brian Pringle
ID: 38319126
You can do that in Task Scheduler.  You have the option of how long to let the task run or how many times it should be run.  The command I gave above only calls it once, so you would have to schedule however often or how many times you want it to run.
0
 
LVL 2

Expert Comment

by:papalala
ID: 38319278
Can you better describe your goal? You can simply kill all browser windows before you open new one but I guess this is not what you want.
0
 

Author Closing Comment

by:hmcnasty
ID: 38320359
Thanks guys.  As I wrote earlier both examples worked perfecly.  I ended up writing another .bat file and used the taskkill command in it to kill internet explorer.  I have them staggered.  works like a charm.

Thanks
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question