Rind timers are one-shot delayed triggers. They fire a Trigger after a duration.

[[timer]]
name = "timeout_four"
duration = "5s"
finish = [{ service = "group:four", stop = true }]
FieldTypePurpose
namestringUnique timer name
durationstringDuration like "5s", "3m", "2h", "1d"
afterarrayService names that must be started first
finisharrayTrigger actions executed on expiry

Duration Format

[[timer]]
name = "quick"
duration = "5s"
 
[[timer]]
name = "long"
duration = "2h"

Finish Actions

When a timer expires, the finish triggers fire:

[[timer]]
name = "backup"
duration = "3600s"
finish = [{ impulse = "backup:run" }]

After: Service Dependencies

Timers can wait for services to be active:

[[timer]]
name = "deferred-job"
duration = "30s"
after = ["database", "network"]
finish = [{ impulse = "job:start" }]

Starting Timers from Triggers

Timers are typically started from Trigger actions:

[[service]]
name = "worker"
run.exec = "/usr/bin/worker"
on-start = [{ timer = "timeout_four" }]

One-Shot Only

Timers fire exactly once. To reschedule, emit the timer impulse again from the finish trigger:

[[timer]]
name = "periodic"
duration = "60s"
finish = [{ impulse = "periodic:tick" }, { timer = "periodic" }]

Stopping Timers

# Start the timer
on-start = [{ timer = "my-timer" }]
 
# Stop the timer before it fires
on-stop = [{ timer = "my-timer", stop = true }]

See also: Services, Flow