awml / platforms / linux-vps-cron

Scheduled scripts on a Linux VPS

Platform · Public ·
Version 2 of 2
  1. #2 · chrismdp · · 0.4ShowingLatest
  2. #1 · chrismdp · · 0.3

Scheduled scripts on a Linux virtual private server, started by cron or by systemd timers and running the workflow's own code. This describes a kind of platform, not anyone's server: a real server's description adds the coding agents its owner runs there, and the folders it keeps. The hosting company can reach the server's disks, and the fit has no field for that. Checked on 22 October 2026.

Install a workflow on scheduled scripts on a Linux VPS

The workflow runs as its own scripts on a server that is on all the time, started by a systemd timer or by cron. AI steps call a model company's API from the scripts. Anything on the server can read everything the server holds, so give the workflow a user of its own and only the folders and keys its scopes allow.

Run awml fit with the workflow's security view and this description first. If you have installed a coding agent on the server, write your own description of it that lists that agent's company under agents, and fit against that instead.

What to create

  1. A user for the workflow, such as sudo useradd --create-home <workflow>.
  2. The workflow's contexts under notes in that user's home, at the paths the security view gives with at. If the notes live in a git repository, clone it there.
  3. A script for the workflow, in its own folder, that runs the steps in the order the drawing lists them: each code step as code, each AI step as a call to the model company the fit named for it. An outside action marked Ask ends in a draft or a message asking a person for a yes, never in the action itself.
  4. A systemd service that runs the script as that user, and a timer that starts it.
# /etc/systemd/system/<workflow>.service
[Service]
Type=oneshot
User=<workflow>
WorkingDirectory=/home/<workflow>/notes
LoadCredential=anthropic:/etc/<workflow>/anthropic
ExecStart=/home/<workflow>/bin/run

# /etc/systemd/system/<workflow>.timer
[Timer]
OnCalendar=Mon..Fri 07:07 Europe/London
Persistent=true

[Install]
WantedBy=timers.target

Where secrets go

Keep each key in a file readable only by root, such as /etc/<workflow>/anthropic with mode 0600, and hand it to the service with LoadCredential=. The script reads it from the folder systemd names in $CREDENTIALS_DIRECTORY, and nothing else on the server sees it. Never put a key in the script, the unit files, the notes or a repository.

How to schedule the triggers

Set OnCalendar= in the timer and turn it on with sudo systemctl daemon-reload and sudo systemctl enable --now <workflow>.timer. With Persistent=true, a run due while the server was down happens at the next boot; plain cron would skip it. A crontab line, from crontab -e as the workflow's user, also works if you can accept that. For a trigger that is an event, have the sender call a small web endpoint on the server, or poll the source from a frequent timer.

How to check it is running

systemctl list-timers <workflow>.timer shows the last and next run. journalctl -u <workflow>.service --since today shows what the latest runs printed, and systemctl status <workflow>.service shows whether the last one failed. Run it once now with sudo systemctl start <workflow>.service, and confirm the notes it should change have changed.

Sources

  • https://man7.org/linux/man-pages/man5/systemd.timer.5.html
  • https://man7.org/linux/man-pages/man5/systemd.exec.5.html
  • https://man7.org/linux/man-pages/man5/crontab.5.html