![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) | ||||||||||||||||||||||||
| Guest | Re: Timeouts I am not sure that (new-job) would work in this case. The problem is the Powershell thread is lock waiting for a function to return and unless had the new-job task wait for x amount of seconds and then send Ctrl-C (which would be problematic at best) I am not sure how you could achieve the goal of the OP. That said... if you have any ideas about this Marco, I would be glad to hear them. This is a constant thorn my side as well. This would be a great feature, but the problem is the single threaded nature of Powershell. I think a good suggestion in this case would developement of a CMDLet that could spawn a new runspace, pass the script block with all the variables in place and kill the runspace if it takes to long. Ironically, I don't think that would be hard to develope. Side Note: The new-job function (which I recommend quite often) is very limited in what you can use it for. Brandon Shell --------------- Blog: http://www.bsonposh.com/ PSH Scripts Project: www.codeplex.com/psobject
M> function is still running XX time later. M> M> v1: M> http://jtruher.spaces.live.com/blog/...628D!130.entry M> v2 CTP1/CTP2: M> *-psjob cmdlets M> Marco M> | ||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||
| | #2 (permalink) | ||||||||||||||||||||||||||||||||||||
| Guest | Re: Timeouts Hehe, Citrix scripters and their problems ![]() Exactly, I was thinking about New-Job, but it wouldn't help me in this case ![]() I don't expect something similar exists, however you never know, so I rather asked... Martin "Brandon Shell [MVP]" <a_bshell.mask@xxxxxx> wrote in message news:29d4f64665478cab4792f3567d8@xxxxxx
| ||||||||||||||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||||||||||||||
| | #3 (permalink) | ||||||||||||||||||||||||
| Guest | Re: Timeouts In the case of CMDLet... the CMDLet would be the bridge. It starts the runspace, runs the code, and returns the objects as it normally would. Brandon Shell --------------- Blog: http://www.bsonposh.com/ PSH Scripts Project: www.codeplex.com/psobject
M> new runspace, however you might use one, then you have two generally M> disconnected runspaces, and you may not be able to pass your objects M> between each. M> M> Tough one... M> M> Marco M> | ||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Timeouts | Martin Zugec | PowerShell | 0 | 07-15-2008 08:01 AM |
| How to change Vista notification Timeouts?? | ryan42 | Vista General | 0 | 03-22-2007 09:17 PM |
| internet connection timeouts | Invent | Vista networking & sharing | 3 | 09-09-2006 12:08 AM |