Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 9242

Stopping a scheduled task with a batch file action doesn't stop the program running in the batch file

$
0
0

I have several scheduled tasks that each execute a (different) batch file. Each batch file calls into the same program, with with separate command line arguments. If I Stop a task while it's running, the program in the batch file still runs. (The batch file is a one-liner that simply executes the program.)

How can I force the program launched from a batch file to force quit when I Stop the task that calls the batch file?

As a work around, I'm look for the task in the running processes, and kill it by process id. I'd like a cleaner solution that's managed from the Task Scheduler.


Viewing all articles
Browse latest Browse all 9242

Trending Articles