atx --help is the quick reference. This page covers the details that are easy
to miss when copying a one-line example.
atx [GLOBAL OPTIONS] [SCHEDULING OPTIONS] WHEN -- PROGRAM [ARG ...]
atx [GLOBAL OPTIONS] [SCHEDULING OPTIONS] --every DURATION -- PROGRAM [ARG ...]
atx [GLOBAL OPTIONS] COMMAND [COMMAND OPTIONS]
The literal -- separates ATX options from the program. It is required for a
scheduled command. In direct mode, ATX passes every following argument as-is;
it does not join or reinterpret them.
atx 30s -- notify-send "tea is ready" atx 2m30s -- make check atx --utc 23:00 -- ./backup-home atx --tz America/Sao_Paulo "2099-01-01 09:00" -- ./report
Use --shell only for a command string that needs shell syntax:
atx --shell 10m -- 'printf "done\n" >>"$HOME/notes"'The string runs through the configured shell (/bin/sh by default). Quoting,
expansion, redirection, and pipelines are the shell's behavior, not ATX's; do
not assemble this string from untrusted input.
--state-dir PATHuses an absolute directory for state and runtime files. Its runtime directory isPATH/runtime, which is useful for tests and isolated installations.--jsonwrites the documented JSON envelope to stdout instead of human output.-q,--quietsuppresses successful human output. It conflicts with--verbose; diagnostics still go to stderr.-v,--verboserequests extra diagnostics.--color MODEchooses color behavior.MODEisauto,always, ornever; an explicit flag takes priority over configuration and environment defaults. Without it,NO_COLORbeing present, even empty, orTERM=dumbdisables color. Otherwise the configured mode applies.autochecks the destination stream: stdout for human results and help, stderr for parser errors. Explicit--color autouses that TTY check even with either environment disable set.alwaysforces color andneverdisables it. JSON output and plain runtime diagnostics do not gain color.-h,--helpprints help and exits successfully.atx helpis also available.-V,--versionprints the program version and exits successfully.atx versionalso has JSON output.
--quiet does not hide errors or the warnings for --shell and --capture-env.
Those warnings matter because the command string or saved environment can be
sensitive.
Supply exactly one of WHEN and --every DURATION, followed by -- PROGRAM [ARG ...].
WHEN is a relative duration, a time of day, a date, or a date-time. Relative
durations use ordered units such as 30s, 2m30s, or 5h. A time of day that
already passed today rolls over to tomorrow unless --no-rollover is given.
A bare date such as 2026-09-01 means 2026-09-01 00:00:00 in the selected
timezone.
Calendar input uses the local IANA timezone by default. --utc selects UTC and
--tz IANA_ZONE selects a bundled IANA timezone; they conflict. A local time
that falls in a daylight-saving gap is rejected. A repeated local time is also
rejected unless --dst earlier or --dst later chooses an offset.
--dry-runvalidates and prints the job without saving it.--utcinterprets calendar input as UTC and conflicts with--tz.--tz IANA_ZONEinterprets calendar input in this IANA timezone and conflicts with--utc.--dst MODEresolves a repeated local time.MODEisreject,earlier, orlater; the default isreject.--no-rolloverrejects an already-passed time of day instead of choosing tomorrow.--every DURATIONcreates a fixed-rate recurring job. Use it instead ofWHEN, not with it.--missed POLICYselects recovery behavior for a deadline missed while no supervisor was running.POLICYishold,run-latest, orskip.--durablerequires installed launchd or systemd integration. It never falls back to session mode.--cwd DIRECTORYruns from an existing directory. An absolute path is used directly; a relative path is resolved from the submitting shell's current directory at submission. ATX stores the canonical absolute path, so later shell directory changes do not affect the job. Without this option, ATX saves the submitting shell's current directory in the same form.--name NAMEsets a short display name;--description TEXTstores a longer note.--shellruns one command string through the configured shell.--ttytries to append captured output to the submitting terminal when the run finishes.
--tty is best effort. If the terminal has closed, the run's outcome does not
change and atx output still has the captured output.
ATX reopens the device without following links and checks that the opened TTY
belongs to the current user and is not world-writable. Each stream echoes only
its last 8 KiB. Control characters are removed except newline and tab; valid
Unicode is kept, and malformed UTF-8 becomes printable replacement characters.
The sanitized text also has an 8 KiB byte limit per stream. A notice marks a
limited tail. A busy or unavailable terminal can receive only part of the echo;
ATX does not wait for it or change its terminal settings. Captured files stay raw.
ATX stores an execution environment with the job. By default it copies only
HOME, USER, LOGNAME, PATH, LANG, TMPDIR, and variables whose names
start with LC_. TZ is not copied by default, so a program's own time
formatting may use a different timezone from the one used to schedule it.
--env KEY=VALUEadds or replaces an environment value; it may be repeated.--env-file PATHreadsKEY=VALUElines from a file and conflicts with--capture-env.--capture-envcopies the complete submitting environment.
Values from --env-file and --env override earlier values. --capture-env
can save credentials in the state database and always emits a warning. Stored
environment values are used for execution but are redacted from show, JSON
output, and doctor.
JOB and RUN accept a full ID or a unique prefix. A non-unique prefix is an
error. Commands that produce a list default to 100 records.
A close command typo such as atx hisotry gets a hint when one command is the
clear match. Hints never rewrite the input or run a command. Time expressions
and program arguments after -- are not treated as command typos.
atx list [--state STATE] [--limit N]lists saved jobs (lsis an alias). States arescheduled,waiting,starting,running,cancel-requested,succeeded,failed,cancelled,interrupted, andmissed.atx show JOBshows one job, its schedule, execution details, and last outcome.atx cancel JOB [--grace DURATION]requests cancellation; the configured grace period applies when omitted. It waits for the active run to stop and for its terminal record. A human stderr TTY gets one wait notice;--quiet,--jsonand non-TTY stderr get none. The process may use one grace period, followed by a terminal-record window of grace plus two seconds. The notice reports those combined waits. Database work can add time outside that window.atx rm JOB [--cancel] [--keep-history]removes a job. It refuses a live job unless--cancelis supplied. History is removed unless--keep-historyis supplied.atx run JOB [--yes]runs a terminal job again.--yesconfirms rerunning an interrupted job, whose previous effect is unknown.atx pslists ATX monitor and command processes that are live now.atx history [JOB] [--limit N]lists completed runs, newest first.atx output RUNprints captured stdout and stderr. A job ID selects its latest run.atx doctorchecks local state, permissions, SQLite, clocks, process identity, configuration, timezone data, and durable-service support.atx service install,atx service status, andatx service uninstallinstall, inspect, and remove the durable per-user service.atx versionprints version information.atx completions --shell SHELLprints a completion script forbash,zsh,fish, orpower-shell.
service install points the service at the current binary and state directory.
Run it again after moving either. On Linux the unit is atx.service; on macOS
the launchd label is io.github.jsugg.atx.
Human output uses local time with its numeric offset, for example
2026-08-26 09:51:56 -03:00, rather than raw UTC microsecond timestamps. JSON
keeps RFC 3339 UTC timestamps and full identifiers for scripts. Human output is
for reading; use --json when parsing fields. Empty human views say No jobs.,
No runs., or No live ATX processes. instead of printing an empty table.
Captured stdout and stderr are kept separately. The per-stream cap defaults to
10 MiB. When a command exceeds it, ATX keeps the beginning of the stream and
discards its tail; human output labels the stream as truncated and JSON sets
stdout_truncated or stderr_truncated. The files are under
runs/<run-id>/stdout.log and runs/<run-id>/stderr.log inside the state
directory.
Successful output goes to stdout. Errors, warnings, and diagnostics go to
stderr. JSON successes use schema_version, ok: true, and data; errors
use the same envelope with ok: false. Version 1 fields are documented in the
JSON API; later releases may add fields without changing their
meanings.
ATX reads optional TOML from <state-dir>/config.toml. The default location is
~/Library/Application Support/atx/config.toml on macOS and
$XDG_STATE_HOME/atx/config.toml (or ~/.local/state/atx/config.toml) on
Linux. Configuration layers are file, then ATX_* environment values, then
explicit command-line flags.
default_timezone = "local" # local or an IANA timezone default_runtime = "session" # session | durable default_shell = "/bin/sh" # absolute path used by --shell cancel_grace = "10s" history_days = 30 terminal_job_days = 30 max_log_bytes_per_stream = 10485760 # 10 MiB; valid range 1..=1073741824 color = "auto" # auto | always | never verbosity = "normal" # quiet | normal | verbose
The only recognized environment names are ATX_DEFAULT_TIMEZONE,
ATX_DEFAULT_RUNTIME, ATX_DEFAULT_SHELL, ATX_CANCEL_GRACE,
ATX_HISTORY_DAYS, ATX_TERMINAL_JOB_DAYS, ATX_MAX_LOG_BYTES_PER_STREAM,
ATX_COLOR, and ATX_VERBOSITY. Unknown keys and invalid values report an
error instead of being ignored.
0: successful command handling. Scheduling success means the job was saved and, when supervised, acknowledged; it does not mean the program ran.2: invalid command line.3: missing or ambiguous job or run ID.4: job state conflict.5: requested platform feature is unavailable.10: state database failure.11: process or supervisor failure. A job can be committed to state but return 11 if ATX cannot reach its supervisor; inspect it withatx show JOB.12: ownership or permission failure.70: unexpected internal failure.
If CLI dispatch panics, ATX writes atx: unexpected internal failure to stderr
and exits 70. It does not print the panic details or a backtrace, even in verbose
or JSON mode. Normal typed errors keep their usual human or JSON output.
This catches unwinding panics on the CLI thread, not process aborts or a second
panic during cleanup.
# bash atx completions --shell bash > ~/.local/share/bash-completion/completions/atx # zsh atx completions --shell zsh > "${fpath[1]}/_atx" # fish atx completions --shell fish > ~/.config/fish/completions/atx.fish # PowerShell atx completions --shell power-shell >> $PROFILE
When building from source, cargo xtask dist-man writes dist/man/*.1. Set
SOURCE_DATE_EPOCH if you need reproducible page dates. Released archives
contain the same files in man-pages/. Copy them to a man1 directory such as
/usr/local/share/man/man1/, then run mandb if your system needs it.