Can a task be stopped automatically or by creating a stop task?
I am attempting open and CLOSE a cctv security monitoring piece of software for a client using the task scheduler. I have successfully created the task to open the software at a certain time. After an exhaustive search, I am unable to create a rule, or use a configuration setting to stop the task from running at the end of the day. (ie, I want the task scheduler to open and exe file at 10am and close it at 3pm and continue that schedule daily) Does anyone know of a way I can accomplish this.
June 13th, 2013 2:50pm

Yeah, if you know the process's exe name, you can run a cmd.exe task, then a taskkill.exe (look it up, it might require an extra download but it's a good little exe to have around) on the specific .exe for your CCTV monitoring software at a specific time. Sorry I don't have precise instructions on how to do this, but I've definitely done it before a few years ago - it works really well. CMD -> Taskkill -> exe name. If that doesn't work precisely in task manager's parameters, you could probably make a .bat script that contains those commands.
Free Windows Admin Tool Kit Click here and download it now
June 13th, 2013 2:58pm

I don't want the liability involved when installing a third party piece of software to accomplish this. Is there a way to get this done with windows 7 task scheduler or a super easy, user friendly way so the field techs that usually are not very familiar with win 7 or any other windows flavor can also get this done.
June 13th, 2013 3:39pm

The Windows 7 Task Scheduler lets you set the time during which a task is allowed to run. After the allotted time is up the Task Scheduler will close it.
Free Windows Admin Tool Kit Click here and download it now
June 13th, 2013 3:50pm

Where and how Oberwald. I've spent so much time in task scheduler Im going cross eye'd. Thanks.
June 13th, 2013 3:53pm

Where and how Oberwald. I've spent so much time in task scheduler Im going cross eye'd. Thanks. Are you using Windows 7? Did you have a look at the items under the "Settings" tab?
Free Windows Admin Tool Kit Click here and download it now
June 13th, 2013 4:11pm

I don't want the liability involved when installing a third party piece of software to accomplish this. Is there a way to get this done with windows 7 task scheduler or a super easy, user friendly way so the field techs that usually are not very familiar with win 7 or any other windows flavor can also get this done. Hm. I just checked my win7 install and it appears that taskkill is now built in (it was always built by microsoft but back in the XP days it was a separate technet download). Here's more info on it. So no worries, you can use it. it's not 3rd party. never was - sorry for not clarifying that.
June 13th, 2013 4:15pm

Hm. I just checked my win7 install and it appears that taskkill is now built in (it was always built by microsoft but back in the XP days it was a separate technet download). Here's more info on it. So no worries, you can use it. it's not 3rd party. never was - sorry for not clarifying that. Why use taskkill.exe when the Task Scheduler has an inbuilt facility to terminate a task that runs longer than it should? BTW - taskkill.exe and its companion tasklist.exe were native in Windows XP, Vista and now in Windows 7 and 8.
Free Windows Admin Tool Kit Click here and download it now
June 13th, 2013 4:24pm

Hm. I just checked my win7 install and it appears that taskkill is now built in (it was always built by microsoft but back in the XP days it was a separate technet download). Here's more info on it. So no worries, you can use it. it's not 3rd party. never was - sorry for not clarifying that. Why use taskkill.exe when the Task Scheduler has an inbuilt facility to terminate a task that runs longer than it should? BTW - taskkill.exe and its companion tasklist.exe were native in Windows XP, Vista and now in Windows 7 and 8. I don't use the task* exe's very much anymore. Anyway, OP, the string to use if you want to use my method is as following: Trigger: time-to-kill-task, set to run "daily" Actions: start a program, taskkill.exe (with parameters of) /IM nameofprocess.exe ---- I just tested it on Picasa3.exe at random, and it worked perfectly. Or, as Oberwald suggests, since you already had a task to start the .exe running, maybe you could just add a task parameter that kills the task once it runs for x amount of minutes/hours. Up to you.
June 13th, 2013 4:29pm

Yes. and yes windows 7 ultimate. Setting/ Allow task to be run on demand run task as soon as possible if task fails, restart every: stop the task if it runs longer than: if the running task does not end when requested, force it to stop if the task is not scheduled to run again, delete it after: (Days) if task is already running, then the following rule applies: options: do not start new instance run a new instance in parallel queue a new instance stop the existing instance. Issues i have here: im looking to run the task for 5 hours.
Free Windows Admin Tool Kit Click here and download it now
June 13th, 2013 4:31pm

Yes. and yes windows 7 ultimate. Setting/ Allow task to be run on demand run task as soon as possible if task fails, restart every: stop the task if it runs longer than: if the running task does not end when requested, force it to stop if the task is not scheduled to run again, delete it after: (Days) if task is already running, then the following rule applies: options: do not start new instance run a new instance in parallel queue a new instance stop the existing instance. Issues i have here: im looking to run the task for 5 hours. Well then, do Oberwald's method - tell it to stop the task if it runs longer than: 5 hours. Try it with some shorter time for your testing, then increase it to 5 hours if that works.
June 13th, 2013 4:38pm

Issues i have here: im looking to run the task for 5 hours. Why is this an issue? Just set the value to 5 hours!
Free Windows Admin Tool Kit Click here and download it now
June 13th, 2013 4:47pm

The options are 1, 4, 8, 12 hour increments. testing at the moment.
June 13th, 2013 5:22pm

The options are 1, 4, 8, 12 hour increments. testing at the moment. Just write 5H (or 5 hours) in the field, or 6m (or 6 minutes), or 35s (or 35 seconds). It's as simple as this!
Free Windows Admin Tool Kit Click here and download it now
June 13th, 2013 5:24pm

The options are 1, 4, 8, 12 hour increments. testing at the moment. Just write 5H (or 5 hours) in the field, or 6m (or 6 minutes), or 35s (or 35 seconds). It's as simple as this! windows 7, task scheduler. There is a drop down gents. my options are 1, 4, 8, 12 hour increments.
June 13th, 2013 5:29pm

There is a drop down gents. my options are 1, 4, 8, 12 hour increments. It's a "suggestive" drop box. You can set your own values. Why not give it a try?
Free Windows Admin Tool Kit Click here and download it now
June 13th, 2013 5:31pm

I'm speechless.. what can i say. You were right. I added my own time in and it worked. Thank you very much.
June 13th, 2013 5:46pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics