The timer runs fleetrc sync on a schedule, with no agent involved. Use it on a machine where no agent runs, such as a server. Everywhere else, session hooks start the syncs.
fleetrc timer install
fleetrc timer status
fleetrc timer removeinit --timer installs it with the rest of the setup, and fleet init --timer does the same on each host.
| Command | What it does | Exit code |
|---|---|---|
timer install | Installs the timer, or updates it. | 0, or 1 when it cannot install |
timer status | Shows whether the OS has it, its last and next run, and its log. | 0 when installed, else 1 |
timer remove | Stops the timer and deletes its files. | 0 |
install and remove take --dry-run:
fleetrc timer install --dry-runtimer fleetrc-sync: `/usr/bin/node /home/me/.local/state/fleetrc/app/cli.mjs sync` on "*/30 * * * *" (the machine's time zone, now Europe/Madrid)
would install a systemd user timerSchedule
Section titled "Schedule"The manifest's timer field sets the schedule. Both keys are optional.
{
"timer": { "cron": "0 */2 * * *", "timeZone": "Europe/Madrid" }
}| Key | Default | Meaning |
|---|---|---|
cron | */30 * * * * | Five fields: minute, hour, day of month, month, day of week. |
timeZone | local | An IANA name such as Europe/Madrid or UTC, or local for the machine's zone. |
fleetrc refuses a cron or zone it cannot read when it loads the manifest. After you change either, run timer install again. doctor warns until you do.
Where it runs
Section titled "Where it runs"| System | Scheduler |
|---|---|
| Linux | A systemd user timer, fleetrc-sync.timer, in ~/.config/systemd/user |
| macOS | A launchd agent, ~/Library/LaunchAgents/fleetrc-sync.plist |
| Windows | A Task Scheduler task |
launchd and Task Scheduler run in the machine's time zone, so a timeZone that gives other times there fails to install. Each run appends to fleetrc-sync.log in the state folder's logs directory.
Linger on Linux
Section titled "Linger on Linux"A systemd user timer stops when you log out unless lingering is on. On a server, turn it on once:
loginctl enable-linger "$USER"timer install and timer status say when linger is off, and doctor reports it as systemd linger.
A container or WSL1 has no systemd user manager and cannot have a timer. timer install exits 1 and prints a crontab line that runs fleetrc sync instead.