Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > How to end a Scheduled Task

Reply
Thread Tools Display Modes

How to end a Scheduled Task

 
 
James Ivey
Guest
Posts: n/a

 
      09-03-2009

I've got a Scheduled Task that simply opens up a browser window. The
browser Home Page points to a php script sitting on my website that executes
when the browser opens. So far so good.

How do I then automatically close the browser window? I would like the
window to close say, a minute after it opens so that I don't have to close
it manually.

Thanks.

James

 
Reply With Quote
 
 
 
 
Andrew McLaren
Guest
Posts: n/a

 
      09-04-2009
James Ivey wrote:
> I've got a Scheduled Task that simply opens up a browser window. The
> browser Home Page points to a php script sitting on my website that
> executes when the browser opens. So far so good.
> How do I then automatically close the browser window? I would like the
> window to close say, a minute after it opens so that I don't have to
> close it manually.


Once the scheduled task has launched the browser, the browser process
continues to run independently of the scheduled task. So even if you
kill or exit the scheduled task process, the browser process
(IExplore.exe, I guess?) keeps running under its own steam. This is in
keeping with the general Windows process model, which doesn't use the
same parent-child, fork-exec model found in Unix and Linux. Every
Windows process is basically stand-alone (there are many subtleties and
exceptions, but that's close enough for now).

So to close the browser window, you'd need to run a script on that PHP
web page to close it automatically; or else, you'd need to kill the
browser process.

You could add a command to your scheduled task job, to kill the browser:

TASKKILL /F /IM IExplore.exe

Although, this would kill *all* current browser windows running; not
just the one started by the scheduled task. Dunno if that's what you
want or not.

Depending on what browser you're using, you could launch a second window
which runs some local JavaScript; what it does is limited only by the
browser's APIs and your ingenuity. There may be script you could run to
close open windows.

Other folks may have extra ideas.

Hope it helps,

Andrew
--
amclar at optusnet dot com dot au
 
Reply With Quote
 
Richard G. Harper
Guest
Posts: n/a

 
      09-04-2009
Unfortunately, you cannot. This would have to be a feature built into
Internet Explorer for that to happen, Task Scheduler only calls the task and
then it (Task Scheduler) goes away. What happens from there is up to the
task that's called.

"James Ivey" <> wrote in message
news:...
> I've got a Scheduled Task that simply opens up a browser window. The
> browser Home Page points to a php script sitting on my website that
> executes when the browser opens. So far so good.
>
> How do I then automatically close the browser window? I would like the
> window to close say, a minute after it opens so that I don't have to close
> it manually.
>
> Thanks.
>
> James
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: How to allow non-admin to run scheduled tasks remotely? Jason Windows Server 1 11-05-2010 06:59 PM
how to run a Scheduled Task when not loggged on childofthe1980s Windows Server 12 07-05-2009 09:35 PM
Re: Can't interact with Scheduled Task Pegasus \(MVP\) Windows Server 0 09-20-2007 01:59 PM
VBS Script doesn't run as a scheduled task Amanda George Windows Server 17 01-26-2005 07:41 PM
Re: AT command Windows Server 1 06-03-2004 11:29 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59