|
04.29.2011, 09:54 AM
Unsure why taskkill isn't doing the job. I use taskkill in a batch file at work on a Windows Server 2008 box and it works fine as a scheduled task. I don't have an XP box ATM to look, but is there an option for the scheduled task properties to run with elevated permissions or something like that?
Alternatively, why not set up a batch file that you run manually before you go to bed. That way, it will run for an hour (or whatever time frame you want) after you run it, not on a specific time.
This is the batch I run at work to open IE, run something, and then kill it after 60 sec (I blanked out the actual URL):
start iexplore address url
ping -n 1 -w 60000 1.1>nul
taskkill /pid iexplore.exe
The ping part, which really does nothing except adds a delay, is what causes the batch to wait 60 sec (60,000 milli-seconds) before it kills the process. For an hour, the wait value would be 3,600,000
|