# Parallelizing/synchronizing subJobs execution

This scenario applies only to subscription-based Talend products.

The following simple scenario creates a five-component main Job that uses one tParallelize component with four tMsgBox single-component subJobs. The tMsgBox\_1 component is the trigger subJob. The tParallelize\_1 component executes tMsgBox\_2 and tMsgBox\_3 simultaneously, and then synchronizes tMsgBox\_4 to be executed at the end of the simultaneous execution of the subJobs.

* Drop four tMsgBox components from the Palette to the design workspace.

* Define their dialog box display properties as desired.

For more information on defining tMsgBox properties, see [tMsgBox](https://help.qlik.com/talend/en-US/components/8.0/tmsgbox/tmsgbox).

* Drop a tParallelize component onto the design workspace.

* Connect the tMsgBox\_1 component to tParallelize\_1 using an OnSubjobOk link, available on the right-click menu. This link will trigger the next subJob(s) only if the first subJob has completed without error.

* Connect tParallelize\_1 to tMsgBox\_2 and tMsgBox\_3 using a Parallelize link for each, available on the right-click menu.These links will simply parallelize the execution of the two connected subJobs.

* Connect tParallelize\_1 to tMsgBox\_4 using a Synchronize link to seqeunce the execution of this fourth subJob.

![](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/Component_tParallelize.png)

* Select the tMsgBox\_4 and set its Basic settings parameters.

* On the Basic settings panel of the tParallelize component and from the Wait For list, select either *end of first subJob* or *end of all subJobs.* This will sequence your fourth subJob to be executed at the end of the first subJob or at the end of all subJobs respectively.

* In the Sleep Duration field, set the time interval in seconds between each check of a subJob execution.

![](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/Component_tParallelize_BasicSettings.png)

* Save your main Job.

* Click the F6 key to run it.

The four message boxes are displayed according to the defined sequence.

The above was a very simple scenario of what the tParallelize component can do for you. However, you can parallelize/synchronize far more complex Jobs with this component whereby each of the subJobs that build the main Job can execute any possible task processed in *Talend Studio* .

**Related reference**

* [tParallelize](https://help.qlik.com/talend/en-US/components/8.0/orchestration/tparallelize "Manages complex Job systems. It executes several subJobs simultaneously and synchronizes the execution of a subJob with other subJobs within the main Job.")

**Related information**

* [tMsgBox](https://help.qlik.com/talend/en-US/components/8.0/tmsgbox/tmsgbox)