SCHED_IDLE
also: idle scheduling class, SCHED_IDLE policy
A CPU scheduling class in Linux that runs tasks only when the system has no other work to do, making it ideal for very low-priority background jobs that should never compete with user-facing processes.
SCHED_IDLE is a scheduling policy that assigns the lowest possible priority to a process. Tasks with this policy will only run when the CPU would otherwise be idle, ensuring they never interfere with normal system operation or user-interactive work.
This is useful for background maintenance tasks like garbage collection, log rotation, or system monitoring that can tolerate arbitrary delays. For example, you might run a backup script with SCHED_IDLE so it only uses CPU cycles that would be wasted anyway.
You can set a process to use SCHED_IDLE with the chrt command: chrt -i 0 ./low_priority_task (the -i flag specifies idle scheduling). Even SCHED_NICE processes with nice=19 (the lowest normal priority) will preempt SCHED_IDLE tasks.