# workers


Defines the list of worker names, which are alternate copies of the application to run as background processes.

Optional in [single-runtime](https://fixed.docs.upsun.com/create-apps/app-reference/single-runtime-image.md#top-level-properties) and [composable](https://fixed.docs.upsun.com/create-apps/app-reference/composable-image.md#top-level-properties) images. 

Using workers in your project requires a [Medium
 plan or larger](https://platform.sh/pricing/) to ensure adequate resource allocation.

Workers are exact copies of the code and compilation output as a `web` instance after a [`build` hook](https://fixed.docs.upsun.com/create-apps/image-properties/hooks.md).
They use the same container image.

Workers can't accept public requests and so are suitable only for background tasks.
If they exit, they're automatically restarted.

```yaml {}
name: <APP_NAME>
type: 'python:3.14'
source:
  root: "/"
workers:
  queue:
    size: S
    commands:
      start: |
        ./worker.sh                
```

The keys of the ``workers`` definition are the names of the workers.
You can then define how each worker differs from the ``web`` instance using
the [top-level properties](https://fixed.docs.upsun.com/create-apps/app-reference/composable-image.md#top-level-properties).
Each worker can differ from the ``web`` instance in all properties except for:

 - ``crons`` as cron jobs don’t run on workers
 - ``hooks`` as the ``build`` hook must be the same
and the ``deploy`` and ``post_deploy`` hooks don’t run on workers.

A worker named ``queue`` that was small and had a different start command could look like this:

    .platform/applications.yaml

```yaml {}
<APP_NAME>:
  type: "composable:26.05"
  source:
    root: "/"
  stack: 
    runtimes: [ "python@3.14" ]
  workers:
    queue:
      size: S
      commands:
        start: |
          ./worker.sh                  
```


