Scheduling
The RegScale CLI can run itself on a schedule. You describe the commands you
already run by hand — an Axonius pull, a Wiz sync, a JCAM export — in a
jobs.yaml file, give each one a cron schedule, and the CLI runs them, records
the outcome, and emails you when one fails.
This is the regscale jobs command group.
Beta
The
jobs.yamlfile format and the command surface are stable. Some advanced
deployment scenarios are still being hardened.
Which document do I need?
| I want to… | Read |
|---|---|
| Get one command running on a schedule, right now | Quickstart |
Know every jobs.yaml field, environment variable, and default | Configuration |
| Write the cron expression for "every Monday at 2am Eastern" | Schedules and cron |
| Run this in Docker, Kubernetes, systemd, host cron, or Windows | Deployment |
| Schedule a command from the interactive terminal UI instead of a file | Scheduling from the TUI |
| Get email when a job fails | Configuration → Email alerting |
| Work out why a job did not run, or did not run when expected | FAQ and troubleshooting |
The pages in this section are the operator-facing guides. The engineering
reference for the same feature — internal locking, state file formats,
invariants — is docs/scheduled-jobs.md in the regscale-cli repository.
The shape of it
jobs.yaml ~/.regscale/
┌──────────────────┐ ┌──────────────────────────┐
│ name: wiz-nightly│ │ jobs_state.json │ what ran, when
│ command: [...] │ │ job_runs/<job>.jsonl │ run history
│ schedule: 0 2 * *│ │ job_logs/<job>-<id>.log │ per-run output
└────────┬─────────┘ └──────────────────────────┘
│ ▲
▼ │
regscale jobs daemon ──── runs ────► regscale <your command>
(or run-due, from cron) (an isolated subprocess)
Three things to hold on to:
- A job is just a RegScale CLI command. Anything you can type as
regscale axonius sync_assets --plan_id 12can be a job. Nothing new to
learn about the command itself. - Credentials never go in
jobs.yaml. They stay ininit.yamlor
environment variables, exactly where they are now. The CLI refuses to load a
jobs file that contains one — see
Configuration → No secrets in jobs.yaml. - Two ways to run the schedule. Either a long-lived
regscale jobs daemon
(good for a container), orregscale jobs run-duetriggered by a scheduler
you already have (good for host cron or a KubernetesCronJob). Pick one —
see Deployment.
Command summary
regscale jobs validate # is my jobs.yaml valid?
regscale jobs list # what is scheduled, when does it next run, how did it last go?
regscale jobs run <name> # run one job now, ignoring its schedule
regscale jobs run-due # run whatever is due, then exit (external-scheduler mode)
regscale jobs daemon # run the scheduler loop in the foreground (container mode)
regscale jobs history <name> # show recent runs for one job
Full option-by-option detail: Configuration → Command reference.
Updated about 8 hours ago
