NetBox includes the ability to execute certain functions as background tasks. These include:
Additionally, NetBox plugins can enqueue their own background tasks. This is accomplished using the Job model. Background tasks are executed by the rqworker process(es).
Each job has an access class, which determines who may access it in addition to the permissions assigned for jobs:
Superusers can access all jobs regardless of access class. The access class applies to every action, so only superusers can view or delete another user's requester jobs, even if permitted to delete jobs. (Housekeeping still purges all jobs under JOB_RETENTION.)
!!! info "This feature was introduced in NetBox v4.8."
A job runner may declare a lifetime for the jobs it creates. Once such a job has finished (whether completed, failed, or errored), it expires when its lifetime runs out, and is deleted by a system job which runs hourly. Pending, scheduled, and running jobs never expire. For example, the jobs for background REST API bulk operations have a lifetime of 24 hours.
A job's lifetime applies regardless of the JOB_RETENTION setting, which remains an upper limit: a job is deleted when it expires or when it exceeds the retention period, whichever comes first. Jobs without a lifetime are subject only to JOB_RETENTION.
Background jobs can be configured to run immediately, or at a set time in the future. Scheduled jobs can also be configured to repeat at a set interval.