GitHub 1
Skip to content

Timer

Sync on a schedule from the operating system, for servers and other machines where no Claude Code or Codex session starts a sync.

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 remove

init --timer installs it with the rest of the setup, and fleet init --timer does the same on each host.

CommandWhat it doesExit code
timer installInstalls the timer, or updates it.0, or 1 when it cannot install
timer statusShows whether the OS has it, its last and next run, and its log.0 when installed, else 1
timer removeStops the timer and deletes its files.0

install and remove take --dry-run:

fleetrc timer install --dry-run
timer 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 timer
txt

The manifest's timer field sets the schedule. Both keys are optional.

{
  "timer": { "cron": "0 */2 * * *", "timeZone": "Europe/Madrid" }
}
.fleetrc/manifest.json
KeyDefaultMeaning
cron*/30 * * * *Five fields: minute, hour, day of month, month, day of week.
timeZonelocalAn 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.

SystemScheduler
LinuxA systemd user timer, fleetrc-sync.timer, in ~/.config/systemd/user
macOSA launchd agent, ~/Library/LaunchAgents/fleetrc-sync.plist
WindowsA 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.

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.