nice
Adjust CPU scheduling priority for a command to reduce CPU impact. Execute with niceness adjustment, capture output, and enforce a safety timeout.
Instructions
Run a command with adjusted CPU scheduling priority (niceness). Executes the given command as a subprocess, captures bounded stdout/stderr, and enforces a safety timeout. Use --dry_run to preview without execution. Positive niceness lowers priority for background tasks; negative values may require elevated privileges. Use to reduce CPU impact of background work. Not for I/O buffering control — use 'stdbuf'. Not for hangup immunity — use 'nohup'. Not for time-bound execution — use 'timeout'. See also 'stdbuf', 'nohup', 'timeout'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| adjustment | No | Niceness adjustment. | |
| command_args | No | Command and arguments to run. | |
| dry_run | No | Report without running the command. | |
| max_output_bytes | No | Maximum captured stdout/stderr bytes each. | |
| timeout | No | Safety timeout for the command. |