Run work outside a request to your web application. Choose a service for a continuous worker or a job for a task that ends.
You will need the following to get started:
- A container image or build source for the task
- The command that starts the worker or task
- Connection details for its database, queue, or external resources
1. Choose the workload type
| Process | Resource | Configuration guide |
|---|---|---|
| Continues to consume work from a queue | Service | Run an image continuously |
| Performs a task and exits | Manual job | Run an image once |
| Performs a task at regular times | Scheduled job | Run an image on a schedule |
A continuous worker must keep its process running while it waits for work. A job command must finish when its task is complete.
2. Configure the workload
Create the selected resource and choose its image. If the image starts a web server by default, override the command with the task command.
Add the required runtime variables and secrets. If the task uses a Northflank database, link the database credentials.
Make sure that the workload can access each required resource before enabling a schedule or adding workers.
3. Define execution behavior
For jobs, review the schedule, concurrency policy, retry limit, and time limit in the job guide. Choose values that fit the task duration and its handling of repeated work.
For a continuous worker, choose its CPU and memory and instance count. Before adding instances, make sure that multiple workers can process the queue safely.
4. Observe the result
Run a test task and examine its logs. Make sure that the expected application result exists. A process exit or a running container alone does not establish that the application work succeeded.
For tasks that form part of a release, use a workflow. For schema changes, read Run migrations.