Skip to main content
A cron trigger fires a button press on a recurring schedule. It lives on the button’s spec and runs under the buttons serve trigger engine.
Schedules are standard 5-field cron expressions (parsed with cron.ParseStandard). Cron attaches to a button only — drawers support webhook triggers, not cron (the cron drawer kind is reserved but not implemented).

Passing args

Pass --arg KEY=VALUE (repeatable) to set the args the press runs with each tick:
buttons trigger add requires exactly one kind flag: --cron, --watch, or --webhook. The trigger id is generated automatically (a short hex id) — there is no --name, --timezone, or --overlap flag.

Management

There is no show, pause, or resume — to stop a schedule, remove the trigger with buttons trigger rm (the id comes from buttons trigger list).

How it fires

A cron schedule is inert without a process watching it. The engine that fires triggers runs in-process inside buttons serve (the local REST API server), not a separate daemon:
  • On startup, buttons serve collects every button’s triggers. The cron scheduler starts only if at least one cron trigger exists.
  • Each scheduled fire presses the target button with the trigger’s configured args and records a normal run in the button’s history.
  • Run buttons serve --no-triggers to start the API without the trigger engine.
Cron triggers fire only while buttons serve is running — keep it up (or under a process supervisor) for schedules to tick.