Meziantou.Framework.Win32.Jobs
4.0.3
Prefix Reserved
dotnet add package Meziantou.Framework.Win32.Jobs --version 4.0.3
NuGet\Install-Package Meziantou.Framework.Win32.Jobs -Version 4.0.3
<PackageReference Include="Meziantou.Framework.Win32.Jobs" Version="4.0.3" />
<PackageVersion Include="Meziantou.Framework.Win32.Jobs" Version="4.0.3" />
<PackageReference Include="Meziantou.Framework.Win32.Jobs" />
paket add Meziantou.Framework.Win32.Jobs --version 4.0.3
#r "nuget: Meziantou.Framework.Win32.Jobs, 4.0.3"
#:package Meziantou.Framework.Win32.Jobs@4.0.3
#addin nuget:?package=Meziantou.Framework.Win32.Jobs&version=4.0.3
#tool nuget:?package=Meziantou.Framework.Win32.Jobs&version=4.0.3
Meziantou.Framework.Win32.Jobs
Meziantou.Framework.Win32.Jobs is a wrapper for Job Objects. A job object allows groups of processes to be managed as a unit. Operations performed on a job object affect all processes associated with the job object. Examples include enforcing limits such as working set size and process priority or terminating all processes associated with a job.
// Create the Job object and assign it to the current process
using var job = new JobObject();
job.SetLimits(new JobObjectLimits()
{
Flags = JobObjectLimitFlags.DieOnUnhandledException |
JobObjectLimitFlags.KillOnJobClose,
});
job.AssignProcess(Process.GetCurrentProcess());
// Start a child process. This process will be terminated if the current process exits
// as the job has the flag KillOnJobClose.
var process = Process.Start("child");
process.WaitForExit();
You can also set limits to the Job Object:
job.SetLimits(new JobObjectLimits()
{
PerProcessUserTimeLimit = ...,
PerJobUserTimeLimit = ...,
MinimumWorkingSetSize = ...,
MaximumWorkingSetSize = ...,
ProcessMemoryLimit = ...,
JobMemoryLimit = ...,
ActiveProcessLimit = ...,
});
// Restrict UI features
job.SetUIRestrictions(JobObjectUILimit.ReadClipboard);
// Limit CPU
job.SetCpuRateHardCap(2000); // 20% of the CPU
job.SetCpuRate(1000, 3000); // 10% to 30% of the CPU
job.SetCpuRateWeight(5); // 1 to 9
// Network limits
job.SetNetRateLimits(10000); // 10Kb/s
// Security limits
job.SetSecurityLimits(JobObjectSecurityLimit.NoAdmin);
// IO Rate limits
job.SetIoLimits(new JobIoRateLimits
{
ControlFlags = JobIoRateFlags.Enable,
MaxBandwidth = 100,
MaxIops = 100,
ReservationIops = 100,
});
You can terminate all processes associated to the job:
job.Terminate();
job.Terminate(exitCode: 1);
You can also get accounting information for processes associated with the job:
var basicInfo = job.GetBasicAccountingInformation();
var basicAndIoInfo = job.GetBasicAndIoAccountingInformation();
var memoryInfo = job.GetMemoryAccountingInformation();
Additional resources
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
-
net10.0
- No dependencies.
-
net11.0
- No dependencies.
NuGet packages (6)
Showing the top 5 NuGet packages that depend on Meziantou.Framework.Win32.Jobs:
| Package | Downloads |
|---|---|
|
krp
A reverse-proxy for dynamic port-forwarding to Kubernetes |
|
|
Meziantou.Framework.ProcessWrapper
Fluent API for wrapping System.Diagnostics.Process |
|
|
MongoDBInstance5_0
Package Description |
|
|
MongoDBInstance3_4
Package Description |
|
|
Raccoon.Tools.WindowsJob
Package Description |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Meziantou.Framework.Win32.Jobs:
| Repository | Stars |
|---|---|
|
Flow-Launcher/Flow.Launcher
:mag: Quick file search & app launcher for Windows with community-made plugins
|
|
|
bitfoundation/bitplatform
Build all of your apps using what you already know and love ❤️
|
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.3 | 272 | 9/11/2026 |
| 4.0.2 | 623 | 9/6/2026 |
| 4.0.1 | 613 | 9/3/2026 |
| 4.0.0 | 6,916 | 7/5/2026 |
| 3.5.8 | 1,611 | 6/28/2026 |
| 3.5.7 | 2,001 | 6/13/2026 |
| 3.5.6 | 2,238 | 5/23/2026 |
| 3.5.5 | 1,719 | 4/25/2026 |
| 3.5.4 | 4,005 | 1/25/2026 |
| 3.5.3 | 715 | 1/18/2026 |
| 3.5.2 | 2,113 | 12/14/2025 |
| 3.5.1 | 753 | 12/7/2025 |
| 3.5.0 | 2,178 | 12/2/2025 |
| 3.4.12 | 1,793 | 11/30/2025 |
| 3.4.11 | 695 | 11/23/2025 |
| 3.4.10 | 3,546 | 11/16/2025 |
| 3.4.9 | 1,265 | 11/9/2025 |
| 3.4.8 | 816 | 11/2/2025 |
| 3.4.7 | 737 | 10/26/2025 |
| 3.4.6 | 661 | 10/19/2025 |