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.
This topic is 2 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
HWLDOME
Posts: 11
Last visit: Thu Jun 15, 2023 10:13 pm
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: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 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: 11
Last visit: Thu Jun 15, 2023 10:13 pm
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: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

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

Post by jvierra »

When a JobTracker completes it calls the JobCompleted procedure.
HWLDOME
Posts: 11
Last visit: Thu Jun 15, 2023 10:13 pm
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: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 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: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 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 4771 times
HWLDOME
Posts: 11
Last visit: Thu Jun 15, 2023 10:13 pm
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. :)
This topic is 2 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked