---
name: "taskpolicy"
section: "8"
platform: "macos"
package: "system_cmds"
version: "1042.120.1"
release: "macOS 26.5"
platforms: ["macos"]
url: "https://new.carta.tech/taskpolicy"
---

# taskpolicy(8)

execute a program with an altered I/O or scheduling policy or change settings of already running process

## NAME

**taskpolicy** – execute a program with an altered I/O or scheduling policy or change settings of already running process

## SYNOPSIS

**taskpolicy** \[**-d** *policy*\] \[**-g** *policy*\] \[**-c** *clamp*\] \[**-b**\] \[**-t** *thruput\_tier*\] \[**-l** *latency\_tier*\] \[**-a**\] \[**-s**\] \[**-S** *shims*\] \[**-m** *limit*\] \[**-j** *pri*\] *program*\[ *arg1* \[*...*\]\]

**taskpolicy** \[**-b\|-B**\] \[**-t** *thruput\_tier*\] \[**-l** *latency\_tier*\] \[**-p** *pid*\]

## DESCRIPTION

The **taskpolicy** program uses the setiopolicy\_np(3) and [setpriority(2)](/setpriority/2.md) APIs to execute a program with altered I/O or scheduling policies. All children of the specified program also inherit these policies.

**taskpolicy** accepts the following flags and arguments:

- **-d** *policy*

  Run the program after calling setiopolicy\_np(3) with an iotype of IOPOL\_TYPE\_DISK, a scope of IOPOL\_SCOPE\_PROCESS, and the specified policy. The argument can either be an integer, or a symbolic string like "default" or "throttle", which is interpreted case-insensitively.

- **-g** *policy*

  Run the program after calling setiopolicy\_np(3) with an iotype of IOPOL\_TYPE\_DISK, a scope of IOPOL\_SCOPE\_DARWIN\_BG, and the specified policy. The argument is interpreted in the same manner as **-d**.

- **-c** *clamp*

  Run the program using the specified QoS clamp. The argument can be either "utility", "background", or "maintenance", which is interpreted case-insensitively.

- **-p** *pid*

  Change settings for the process specified by *pid*.

- **-m** *limit*

  Run the program with specified memory limit (in MiB).

- **-j** *pri*

  Run the program at the specified jetsam priority.

- **-P** *pcontrol*

  Run the program with the specified process control action, which may be invoked by the system upon resource exhaustion. Valid options include "kill", "throttle", and "suspend".

- **-S** *shims*

  Run the program with security transition shims in effect.

- **-b**

  Run the program after calling [setpriority(2)](/setpriority/2.md) with a priority of PRIO\_DARWIN\_BG.

- **-B**

  Move target process out of PRIO\_DARWIN\_BG.

- **-t**

  Set throughput tier of the process to *thruput\_tier*.

- **-l**

  Set latency tier of the process to *latency\_tier*.

- **-a**

  Run the program with the resource management policies given to applications.

- **-s**

  Run the program with an initial suspended state by calling [posix\_spawnattr\_setflags(3)](/posix_spawnattr_setflags/3.md) with POSIX\_SPAWN\_START\_SUSPENDED.

## SEE ALSO

[setpriority(2)](/setpriority/2.md), [posix\_spawnattr\_setflags(3)](/posix_spawnattr_setflags/3.md), setiopolicy\_np(3)
