Automation
Cron schedules and actions for your app services
Run a command in an app service at set times, after a deployment, or with a button in the dashboard. Each run is recorded as a task with its logs.
- Schedule commands with standard crontab syntax
- Schedules come from the service, the stack, or one app environment
- Run actions after a deployment, after a stack upgrade, or by hand
Run a command in a service on a schedule
A cron schedule is a command, the service it runs in, and a crontab expression.
A cron schedule runs a command in an app service at the times a standard five-field crontab expression gives. One job of a schedule runs at a time: when a run is still going as the next one falls due, the next one is skipped, so slow jobs do not pile up.
A schedule runs only while its app environment is running and the service is deployed and healthy. A run that falls due at any other time is skipped and is not replayed later.
Schedules from the service, the stack, or the app environment
A schedule can be defined at three levels.
Some services come with schedules of their own, such as the cron run of a CMS. A stack can add schedules for its services, and you can create more for one app environment. On the Cron page of an environment you change when a schedule runs, turn it off, or start a run by hand.
- A service can define the schedules that its software needs.
- A stack can add schedules that every app environment created from it starts with.
- An app environment can have schedules of its own and change the timing of the others.
See every run and hear about failures
Each run is a task with its logs.
Every run, scheduled or manual, is recorded as a task with the output of the command. The Cron page of an app environment shows the run history of each schedule. When a schedule starts failing, Wodby emails the organization admins who asked for these notifications, and emails them again when it recovers.
Actions that run after a deployment or a stack upgrade
An action is a command that a service defines.
A service can define actions that Wodby runs for you: after every deployment of the service, after its first deployment only, or after the app environment is upgraded to a new stack revision. Scripts of your own belong in your repository. Wodby runs the ones in .wodby/post-deployment.yml after a successful rollout, as part of CI/CD.
Actions you start from the dashboard
Other actions are buttons on the app service.
These actions appear on the Actions tab of an app service, for example to clear a cache or to create a one-time login link. Running one creates a task, and the output of the command is in the task log. An action is available while the service and its app environment are healthy.
Next step
Schedule the first task
Create an account, deploy a stack, and open the Cron page of an app environment. Cron schedules need a paid plan.