Windows 10 How to run concurrent batch jobs in task scheduler

James Anning

Senior Member
Joined
Oct 16, 2016
hi,

This should be an easy answer. I want to create one scheduled task, it will be called "CLEAR_PHOTOSBYDATE", see attached pic or (approximate example, not literal job...yet)

In this task I will have several batch jobs. I know how to set it up to run them consecutively, 1st one runs, the 2nd will not run till first completes. I want it to kick of the first batch job, then immediately kick off the 2nd, 3rd etc., I want to run them all at once in parallel.
How is this done?
Thanks James.
 

Attachments

  • ss1.jpg
    ss1.jpg
    248.8 KB · Views: 651
@neemo: Is this possible? I didn't think the Task Scheduler was capable of parallel-processing multiple batch jobs.

Hi James,
I'm asking one of our crack programmers if this is even possible for you. If it is, he may have a script file or a power-shell file that you can use for it as well. My understanding is that in order to run in parallel, you'd have to have multiple computers hooked up to your hard drive to do so. The other possibility is that you could use the multiple desktops feature of W10 to have your batch file run each batch job from a different W10 desktop session. This might also work if you were using a VMware type of product or hyper-V to run the multiple batch jobs from different W10 VM sessions each spawned by the original script file. It is possible to run multiple VM sessions in W10 each running a different batch job, but how many you can run is dependent on the power of your CPU chip, and a function of the amount of RAM you have in your computer and the size of your hard drive. Multiple sessions each eat up considerable RAM (many GB). Hopefully, we'll hear back from neemo or one of the other fellas here who might have a more specific suggestion for you, a sample script file as I said, etc.

Best,:D
<<<BIGBEARJEDI>>>
 
Why not make it all one batch file then or have the first batch file start the second and wait for it to complete then start the third.
 
At best you would need to have the have the first batch file create an entry in the event log and have the second batch file fire off on an Event Trigger, and create a second event that triggers the third batch file.
 
You may also want to create a powershell script install of a batch file, you will have a lot more control and the script will be much easier to write. If you have more information about the process and from where you are cleaning up data from I'd be happy to help you write a powershell script.
 
I just separated the huge .bat file I had, into 8 logically grouped .bat files, then used one bat file containing the below. It kicks them all 8 off, at once and finishes all I need done in 20 minutes instead of the 4 hours it did take before. What I was looking for, was to put the 8 bat files in the scheduler and have it spawn all 8, ....instead of the below doing it. Works like a champ, I'd still like to hear other possibilities.


START CLEAR_PHOTOSBYDATE0.BAT
START CLEAR_PHOTOSBYDATE1.BAT
START CLEAR_PHOTOSBYDATE2.BAT
START CLEAR_PHOTOSBYDATE3.BAT
START CLEAR_PHOTOSBYDATE4.BAT
START CLEAR_PHOTOSBYDATE5.BAT
START CLEAR_PHOTOSBYDATE6.BAT
START CLEAR_PHOTOSBYDATE7.BAT
 
It does, I have to say...I'm a bit confused and overwhelmed with the "multiple computers hooked up to your hard drive to do so. The other possibility is that you could use the multiple desktops feature of W10 to have your batch file run each batch job from a different W10 desktop session. "......Now, I've only been a database apps developer for 25 years...so I have not seen it all...but, this one baffles me?
 
Back
Top Bottom