Urgent!! How to add-jobtracker in sequence

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
HWLDOME
Posts: 9
Last visit: Tue Aug 03, 2021 12:44 am
Has voted: 1 time

Urgent!! How to add-jobtracker in sequence

Post by HWLDOME »

Hi,

I am using a same start-job button to run jobs (let's say jobs A1,A2,A3, B1, B2, B3). What I want is that A1,A2,A3 can be run in parallel, and B1, B2, B3 can be run in parallel. But only A jobs are completed then can start B jobs.
So I define two $paramAddJobTracker: $paramAddJobTrackerA is for A jobs and $paramAddJobTrackerB is for B jobs. then I

Add-JobTracker @paramAddJobTrackerA
Add-JobTracker @paramAddJobTrackerB
,

but it seems A jobs and B jobs are run in parallel. May I know how to handle this? Thank you!

jvierra
Posts: 14930
Last visit: Mon Sep 20, 2021 8:13 am
Answers: 14
Has voted: 3 times
Been upvoted: 11 times

Re: Urgent!! How to add-jobtracker in sequence

Post by jvierra »

If you simultaneously run two JobTrackers then they will run in parallel. YOu have to finish the "A" jobs before running the "B" jobs.

HWLDOME
Posts: 9
Last visit: Tue Aug 03, 2021 12:44 am
Has voted: 1 time

Re: Urgent!! How to add-jobtracker in sequence

Post by HWLDOME »

jvierra wrote:
Mon Aug 02, 2021 2:16 am
If you simultaneously run two JobTrackers then they will run in parallel. YOu have to finish the "A" jobs before running the "B" jobs.
Thank you for your reply. But how can I know the A jobs have been done?

jvierra
Posts: 14930
Last visit: Mon Sep 20, 2021 8:13 am
Answers: 14
Has voted: 3 times
Been upvoted: 11 times

Re: Urgent!! How to add-jobtracker in sequence

Post by jvierra »

When a JobTracker completes it calls the JobCompleted procedure.

HWLDOME
Posts: 9
Last visit: Tue Aug 03, 2021 12:44 am
Has voted: 1 time

Re: Urgent!! How to add-jobtracker in sequence

Post by HWLDOME »

jvierra wrote:
Mon Aug 02, 2021 2:35 am
When a JobTracker completes it calls the JobCompleted procedure.
Thank you so much for your patience. But I am not familiar how can I know whether the jobtracker calls this procedure? is there any variable that I can check? may I bother you to explain more? such as the code syntax. Thank you :D

jvierra
Posts: 14930
Last visit: Mon Sep 20, 2021 8:13 am
Answers: 14
Has voted: 3 times
Been upvoted: 11 times

Re: Urgent!! How to add-jobtracker in sequence

Post by jvierra »

The JobTracker code you loaded has the instructions you just have to read teh code comments to see how it worlks or look in the Sapien Info Center for the bloag articles that expalin how to use teh JobTracker.

jvierra
Posts: 14930
Last visit: Mon Sep 20, 2021 8:13 am
Answers: 14
Has voted: 3 times
Been upvoted: 11 times

Re: Urgent!! How to add-jobtracker in sequence

Post by jvierra »

Screenshot 2021-08-02 082750.png
Screenshot 2021-08-02 082750.png (24.72 KiB) Viewed 2700 times

HWLDOME
Posts: 9
Last visit: Tue Aug 03, 2021 12:44 am
Has voted: 1 time

Re: Urgent!! How to add-jobtracker in sequence

Post by HWLDOME »

jvierra wrote:
Mon Aug 02, 2021 5:21 am
The JobTracker code you loaded has the instructions you just have to read teh code comments to see how it worlks or look in the Sapien Info Center for the bloag articles that expalin how to use teh JobTracker.
Thank you so much. I will take a read to learn. Will update you once the issue is solved. :)

Locked