One-off tasks
A one-off task runs a command inside a deployed Service and records the result. Use it for maintenance work that needs the same code, Config, Secrets, database access, and persistent files as the running app, but should finish after one run.
Last updated
AI agent? Start with llms.txt.
Run the command in the app's environment
Enter the command and, when needed, a working directory. Examples include python manage.py clearsessions, php artisan cache:clear, or node scripts/backfill.js.
Tokay runs the command against the Service's current deployed version. Output, exit status, actor, and time are kept as a durable record, so the team can see what ran and what it changed later.
A command that starts a server or waits forever belongs in a Service rather than a task.
Use tasks for operational work
Tasks fit framework maintenance commands, one time data backfills, cleanup scripts, and inspection of the environment the app sees.
Database schema changes should normally ship as migrations with a deploy. Before production changes, Tokay rehearses the migration, takes a snapshot, and applies the Project's release safety setting. See Database migrations.
Agents can run tasks without SSH
Tokay does not expose SSH to the server. Your AI agent can run and poll one-off tasks through the API instead, with the same recorded output a human sees in the dashboard.
The exact mutation and polling contract is published at https://app.tokay.io/llms.txt.