Skip to content
Console

Policies

Policies control how long a job runs and when it stops automatically.

{
"policies": {
"maxDurationSec": 7200,
"idleTimeoutSec": 60
}
}
FieldTypeDefaultDescription
maxDurationSecint0 (unlimited)Maximum job duration in seconds. 0 disables the cap. When reached, the job completes. Clamped to max 86400 (24h).
idleTimeoutSecint60Seconds without media activity before the job ends. Activity comes from components_metrics (videoMillis / audioMillis / videoFrames / audioFrames). Set 0 to disable. Clamped to max 3600.

Idle is evaluated every ~10s with this priority:

  1. Source idle — if the job has sources and none have reported activity within idleTimeoutSec, the job ends with event job.idle_timeout and reason source (Prometheus label source_idle).
  2. Sink idle — otherwise, if the job has sinks and none have reported activity within the threshold, it ends with the same event and reason sink (Prometheus label sink_idle).
  3. Jobs with no sinks only check sources.

If a role never saw activity, the grace baseline is the job’s updatedAt / createdAt (not wall-clock zero). Job status is completed, same as other policy stops.

  • RTC sources (livekit, jitsi, daily, agora): idle when room media matching your select filters stops producing metrics.
  • Pull sources (rtmp_pull, hls_pull, etc.): idle when the stream stalls or disconnects (no further metrics activity).

Idle periods are not billed for media processing. See Billing overview.

Jobs also stop when you call DELETE /v1/jobs/:name or when the platform container reaches its maximum lifetime.