TIMER(1) General Commands Manual TIMER(1)

timerrun command at a specific interval

timer [-w] [-c clockid] interval command [arguments...]

The timer utility runs command at every interval.

The interval argument is a string containing non-negative decimal numbers including floats, terminated by suffixes: s for seconds, m for minutes, h for hours, d for days.
If the final number doesn't have a suffix, seconds are assumed. Longer durations are taken as out of scope.

If command exits with a non-zero status, timer exits with the same status, allowing to use service supervision to track failures.

clockid
Set the clock to be used for the timer. The clockid argument can be set to one of the following shortcodes:
r
CLOCK_REALTIME (default)
m
CLOCK_MONOTONIC
b
CLOCK_BOOTTIME
ra
CLOCK_REALTIME_ALARM
ba
CLOCK_BOOTTIME_ALARM
t
CLOCK_TAI

See timer_create(3) for the behavior of each clock. Note that only CLOCK_REALTIME and CLOCK_MONOTONIC are portably defined in POSIX.1-2024.

Wait for interval to elapse. Otherwise timer immediately runs command after starting.

The timer utility exits 0 on success, and >0 if an error occurs.

at(1), crontab(1), sleep(1), timer_create(3)

Haelwenn (lanodan) Monnier <contact+cmd-timer@hacktivis.me>

June 18, 2025 Linux 6.18.18-gentoo-x86_64