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
| Flag | Meaning |
|---|---|
--config <path> | Path to the JSON config holding
cronhoster-config-serverAddress, cronhoster-config-apiToken and
cronhoster-config-contentRoot. Required. |
--watch | Stay 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-run | Show exactly what would happen (new crons to upload, retired crons to delete, and crons already synced) and exit without touching the server. |
--verbose | Log every top-level entry considered and the sync decision for
it (+ upload, - delete, = already synced). Pair with
--dry-run to debug ignore rules. |
--pull-logs | After syncing, mirror the server's Caddy access log back for the Web Logs browser. |
--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
| Flag | Builds |
|---|---|
--sync | Pushes your crons up first (the same as local/sync.js). |
--web-logs | The Web Logs browser from the mirrored access log. |
--server-logs | The Server Logs browser from the mirrored health samples. |
--cron-logs | The Cron Logs browser from the mirrored run records. |
--all | Everything 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
| Command | Purpose |
|---|---|
systemctl status cronhoster-api | Health of the localhost sync API that the local scripts upload to. |
systemctl status cronhoster-runner | Health of the scheduler that discovers crons and runs their handlers on time. |
systemctl restart cronhoster-api | Restart the sync API, e.g. after the token or Caddy config changes. |
systemctl restart cronhoster-runner | Restart the scheduler. In-flight runs stop; missed times are skipped, not backfilled. |
journalctl -u cronhoster-runner | The 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.