Overview
An automation is a note with type: automation in its frontmatter
and a script in a code block. It can notify you, or send a report to your
Inbox or email. Automations only run while Noxical is open. A run missed while
it was closed runs once when you return.
Example
---
type: automation
schedule: "*/30 * * * *"
notify: on-change
---
```sh
echo "::notify title=Hello::Message body"
```
Frontmatter
| Field | Default | Meaning |
|---|---|---|
type |
automation. Required. |
|
schedule |
Cron (5 or 6 fields), or @hourly, @daily,
@weekly, @monthly, @yearly. Leave
out to run only by hand.
|
|
timezone |
Your machine's | Time zone name, such as Asia/Hong_Kong. |
enabled |
true |
false keeps it listed but never scheduled. |
run |
Path of a script in the vault, instead of a code block. | |
args |
[] |
Arguments for the script. |
notify |
always |
on-change notifies only when messages differ from the last
run.
|
onFailure |
notify |
ignore only records failures. |
timeout |
60s |
30s, 5m or seconds. At most 10m.
|
catchUp |
true |
Runs once on return after a missed run. |
deliver |
Where the report goes: inbox, email,
desktop, or a list.
|
Scripts
-
Code blocks can be
sh,bash,zsh,python,nodeorruby. Node is always available. The others come from your PATH. -
Print
::notify title=Title::Messageto send a notification, up to five per run. - Print
::skip::reasonto stop quietly. -
Python packages: declare them in a PEP 723
# /// scriptblock. They install throughuv. - Several code blocks run in order as steps. Each step receives the previous step's output on standard input.
-
A
promptcode block asks Noxical AI. It can use the web and read-only plugin tools, and cannot read your files. -
Scripts run from the vault root, with
NOXICAL_VAULT,NOXICAL_AUTOMATION,NOXICAL_LAST_RUNandNOXICAL_INPUTset.
Reports
- The output of the last step is the report. A first-line heading becomes its title.
-
inboxneeds the Inbox plugin. -
emailgoes through the Email plugin, only to the addresses set in its settings. A note cannot name a recipient.
Approval
A script must be approved before it runs. Approve automation script shows you the code.
Settings
| Setting | What it does |
|---|---|
| Folder for new automations | Where New automation creates its note. Automations work in any folder. |
Commands
- Open automations
- New automation
- Run automation
- Approve automation script
Your data
Automations are notes in your vault. Run history is in
.noxical/plugins/automations/runs.json.