Running multiple jobs, show their statuses: design & implementation

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 7 years and 6 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
User avatar
stevens
Posts: 493
Last visit: Mon Sep 19, 2022 12:23 am
Has voted: 2 times

Running multiple jobs, show their statuses: design & implementation

Post by stevens »

Product, version and build: PS Studio, latest build
32 or 64 bit version of product: 64
Operating system: W2K12R2
32 or 64 bit OS: 64
PowerShell Version: 5

DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM

Hi,

I have this form which does some querying of computers/users (f.e. what app-v packages are installed for computer x, what is mailboxsize for user y etc). Now most queries only take ms, but some queries make the form freeze for 10s of seconds.

I found an explanation/example howto make that work with jobs, this example contains a simple ping:
viewtopic.php?f=12&t=9153 (button shows that query is running).

However, to make my form more responsive, I would like several jobs to run simultanesouly and show the progress of each job.
I am not sure how I would include that in my form (rough drawing of current form: download/file.php?id=2261) yet.
A richtexbox now shows the selection which was made in a gridview, then also shows what status of actions taken upon that object (computer, user) are, f.e. 'getting
app-v packages of computername01', 'done' etc.

When I would launch items as jobs, I could mention 'Launching job Getting-App-V package of computername' see status of jobs for progress. Running jobs would then be a richttextbox with name of running jobs but also a icon should indicate that jobs are running.

I'd like your advise on howto approach this and work it out.
Hope this is clear.
---
Note: I found an example of multiple jobs running here and tried that one with computername01 and computername02:
http://blog.coretech.dk/kaj/sccm-client ... a-poshcat/
This is the logging what the poshcat generates and what I would like to achieve too (but not that much in detail):

Selected command: Get APP-V Client Configuration
Starting to run Get APP-V Client Configuration
Job Type: Remote
Adding computer01 PSH JOB
Adding computer02 PSH JOB
Get APP-V Client Configuration Completed on computer01
Removing JOB ID: 3 from the array
Exporting Content to report: Get APP-V Client Configuration_1769276736
Get APP-V Client Configuration Completed on computer02
Removing JOB ID: 2 from the array
Exporting Content to report: Get APP-V Client Configuration_1769276736
-------------------------------------------------------------------------------
TOTAL FAILED JOBS: 0
TOTAL SUCCESS JOBS: 2
Please check the following report: Get APP-V Client Configuration_1769276736
Report location: "c:\temp\PoshCAT_0.2\Reports\Get APP-V Client Configuration_1769276736.csv"
TOTAL TIME: 0.129624025 minutes
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Running multiple jobs, show their statuses: design & implementation

Post by davidc »

[TOPIC MOVED TO THE POWERSHELL GUIS FORUM BY MODERATOR]
David
SAPIEN Technologies, Inc.
User avatar
dan.potter
Posts: 709
Last visit: Wed Nov 14, 2018 11:39 am

Re: Running multiple jobs, show their statuses: design & implementation

Post by dan.potter »

search here for 'job tracker'
User avatar
stevens
Posts: 493
Last visit: Mon Sep 19, 2022 12:23 am
Has voted: 2 times

Re: Running multiple jobs, show their statuses: design & implementation

Post by stevens »

Ok, when I do I get exactly one hit and that is exactly this post :-(
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Running multiple jobs, show their statuses: design & implementation

Post by jvierra »

Search the blog posts on this forum.
User avatar
dan.potter
Posts: 709
Last visit: Wed Nov 14, 2018 11:39 am

Re: Running multiple jobs, show their statuses: design & implementation

Post by dan.potter »

Typical searches via google, I think chrome knows my habits :D "sapien spotlight <nameofcontrol>"
Untitled.png
Untitled.png (70.78 KiB) Viewed 2623 times
This topic is 7 years and 6 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