Skip to content

Creating a Cron Job

Open Settings → Cron and click New job.

FieldWhat it is
NameHuman-readable label shown in the panel and run history
Cron expression5- or 6-field croner-compatible expression. Second field is optional
TimezoneIANA zone (e.g. America/New_York, Europe/London, UTC)
PromptThe task sent to the agent each time the job fires
Workspace rootAbsolute path to the workspace the agent runs in. Required

Cron expressions and timezones are validated by croner at save time. If either is invalid, croner’s diagnostic message is surfaced verbatim in the form — no re-wrapping, so you can search the croner docs directly.

The workspace root is validated at the RPC boundary:

  • Must be an absolute path
  • No .. segments allowed (no escape)
  • Must point to an existing directory readable by Ptah

For automation or A2A scenarios:

MethodPurpose
cron:createCreate a job
cron:updateUpdate an existing job
cron:deleteDelete a job (cascade-deletes its run history)
cron:toggleEnable / disable a job without deleting it
cron:runNowFire the job immediately, off-schedule
cron:listList all jobs
cron:getFetch a single job
cron:runsList past runs for a job
cron:nextFireCompute the next scheduled fire time
  • Start with the cron expression 0 * * * * (top of every hour) and Run now the first time to confirm the job behaves as you expect.
  • Toggle a job off rather than deleting it if you’re just pausing — run history stays intact.
  • Use small, idempotent prompts. A 200-line prompt that runs every 5 minutes is a recipe for noise.