Commands

Two surfaces: the local CLI you run on your own machine to sync your crons and pull logs, and the service commands you run on the server to manage the API and the runner. The local scripts are the ones you touch daily; the server commands are for setup and the occasional check-in.

node local/sync.js: push your crons

Reads your config.json, compares your content root's top-level cron directories with the server, and uploads any the server does not yet have (removing any you have retired). Every invocation needs --config; the rest are optional.

node local/sync.js --config config.json --watch
Sync your crons and keep watching for changes.
FlagMeaning
--config <path>Path to the JSON config holding cronhoster-config-serverAddress, cronhoster-config-apiToken and cronhoster-config-contentRoot. Required.
--watchStay resident and re-sync whenever the content root changes, picking up a newly published or retired cron. The natural mode while authoring.
--interval <dur>Instead of watching, re-sync on a fixed timer (e.g. 30s, 5m). Useful under a supervisor that expects a long-running process but where filesystem events are unreliable.
--dry-runShow exactly what would happen (new crons to upload, retired crons to delete, and crons already synced) and exit without touching the server.
--verboseLog every top-level entry considered and the sync decision for it (+ upload, - delete, = already synced). Pair with --dry-run to debug ignore rules.
--pull-logsAfter syncing, mirror the server's Caddy access log back for the Web Logs browser.
A plain --config run does a single sync and exits. Add --watch or --interval to keep it running. See Usage → Local for the workflow these flags support.

node local/cronhoster-tools.js: the log browsers

Mirrors the server's logs and builds static, browsable pages under the configured cronhoster-config-tools directory. Run it with any mix of switches, or --all.

node local/cronhoster-tools.js --config config.json --all
Build the Web, Server and Cron Logs pages in one run.
FlagBuilds
--syncPushes your crons up first (the same as local/sync.js).
--web-logsThe Web Logs browser from the mirrored access log.
--server-logsThe Server Logs browser from the mirrored health samples.
--cron-logsThe Cron Logs browser from the mirrored run records.
--allEverything above.

The pages land under your cronhoster-config-tools directory; see the Tools section for what each one shows.

Server-side services

The installer lays down two systemd units. Manage them with ordinary systemctl; they run as a dedicated non-root user.

# is the sync API healthy?
systemctl status cronhoster-api

# is the scheduler running your crons?
systemctl status cronhoster-runner

# restart after an upgrade or a config change
sudo systemctl restart cronhoster-runner
Check and restart the two services.
CommandPurpose
systemctl status cronhoster-apiHealth of the localhost sync API that the local scripts upload to.
systemctl status cronhoster-runnerHealth of the scheduler that discovers crons and runs their handlers on time.
systemctl restart cronhoster-apiRestart the sync API, e.g. after the token or Caddy config changes.
systemctl restart cronhoster-runnerRestart the scheduler. In-flight runs stop; missed times are skipped, not backfilled.
journalctl -u cronhoster-runnerThe service's own journal: it starts and stops here, and a cron being added or removed is one line. Per-run detail is kept out of the journal.

Each run is captured as a structured record (duration, exit code, and the tail of its stdout/stderr), written to dated day-files server-side, pruned after fourteen days, and shown per run in the Cron Logs tool.

See also