> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-docs-hivemind-launch.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Add job to queue

> Add launch jobs to a W&B Launch queue using the App UI or CLI to schedule ML workloads on target resources.

This page describes how to add launch jobs to a launch queue. Adding a job to a queue submits it to run on the queue's target resource. You can schedule ML workloads against the compute environment your team configured.

<Note>
  Ensure that you, or someone on your team, already configured a launch queue. For more information, see [Set up Launch](/platform/launch/set-up-launch/).
</Note>

## Add jobs to your queue

Add jobs to your queue interactively with the W\&B App or programmatically with the W\&B CLI.

<Tabs>
  <Tab title="W&B App">
    To add a job to your queue interactively with the W\&B App:

    1. Navigate to your W\&B project page.
    2. Select the **Jobs** icon in the project sidebar:

    <Frame>
      <img src="https://mintcdn.com/wb-21fd5541-docs-hivemind-launch/zScEGRJKnI_Vuqe8/images/launch/project_jobs_tab_gs.png?fit=max&auto=format&n=zScEGRJKnI_Vuqe8&q=85&s=c47a97627e5149271fd80a2e09807500" alt="Project Jobs tab" width="2177" height="1353" data-path="images/launch/project_jobs_tab_gs.png" />
    </Frame>

    3. The **Jobs** page displays a list of W\&B launch jobs created from previously executed W\&B runs.

    <Frame>
      <img src="https://mintcdn.com/wb-21fd5541-docs-hivemind-launch/TmmFTIPGtNLf7lqr/images/launch/view_jobs.png?fit=max&auto=format&n=TmmFTIPGtNLf7lqr&q=85&s=5b8bb4c9935254aa5097fba69ec5178c" alt="Jobs listing" width="2156" height="1058" data-path="images/launch/view_jobs.png" />
    </Frame>

    4. Select the **Launch** button next to the job name. A modal appears.
    5. From the **Job version** dropdown, select the version of the launch job you want to use. Launch jobs are versioned like any other [W\&B artifact](/models/artifacts/create-a-new-artifact-version/). W\&B creates different versions of the same launch job if you modify the software dependencies or source code used to run the job.
    6. Within the **Overrides** section, provide new values for any inputs configured for your launch job. Common overrides include a new entrypoint command, arguments, or values in the `wandb.Run.config` of your new W\&B run.

    <Frame>
      <img src="https://mintcdn.com/wb-21fd5541-docs-hivemind-launch/zScEGRJKnI_Vuqe8/images/launch/create_starter_queue_gs.png?fit=max&auto=format&n=zScEGRJKnI_Vuqe8&q=85&s=c6d5483d3cc7c287916676f860828233" alt="Queue configuration" width="1241" height="1038" data-path="images/launch/create_starter_queue_gs.png" />
    </Frame>

    To copy and paste values from other W\&B runs that used your launch job, select the **Paste from...** button.
    7\. From the **Queue** dropdown, select the name of the launch queue you want to add your launch job to.
    8\. Use the **Job Priority** dropdown to specify the priority of your launch job. If the launch queue doesn't support prioritization, W\&B sets the priority to `Medium`.
    9\. Optional: Follow this step only if your team admin created a queue config template. Within the **Queue Configurations** field, provide values for configuration options that your team admin created. For example, the following image shows a team admin who configured AWS instance types that the team can use. In this case, team members can select either the `ml.m4.xlarge` or `ml.p3.xlarge` compute instance type to train their model.

    <Frame>
      <img src="https://mintcdn.com/wb-21fd5541-docs-hivemind-launch/zScEGRJKnI_Vuqe8/images/launch/team_member_use_config_template.png?fit=max&auto=format&n=zScEGRJKnI_Vuqe8&q=85&s=3ef56b2c2bed116a9f26a9ddfb2a9bda" alt="Config template selection" width="1092" height="1790" data-path="images/launch/team_member_use_config_template.png" />
    </Frame>

    10. Select the **Destination project**, where the resulting run appears. This project must belong to the same entity as the queue.
    11. Select the **Launch now** button.

    Your job is now queued and runs on the queue's target resource. The resulting run appears in the destination project you selected.
  </Tab>

  <Tab title="W&B CLI">
    Use the `wandb launch` command to add jobs to a queue. For example, using the script from the [Quickstart](/platform/launch/walkthrough/) guide, create a JSON file with the following hyperparameter overrides:

    ```json title="config.json" theme={null}
    {
      "overrides": {
          "args": [],
          "run_config": {
              "learning_rate": 0,
              "epochs": 0
          },   
          "entry_point": []
      }
    }
    ```

    <Note>
      W\&B Launch uses the default parameters if you don't provide a JSON configuration file.
    </Note>

    To override the queue configuration, or if your launch queue doesn't have a configuration resource defined, specify the `resource_args` key in your `config.json` file. For example, continuing the preceding example, your `config.json` file might look similar to the following:

    ```json title="config.json" theme={null}
    {
      "overrides": {
          "args": [],
          "run_config": {
              "learning_rate": 0,
              "epochs": 0
          },
          "entry_point": []
      },
      "resource_args": {
            "[RESOURCE-TYPE]" : {
                "[KEY]": "[VALUE]"
            }
      }
    }
    ```

    Replace the bracketed placeholders with your own values.

    Provide the name of the queue for the `queue` (`-q`) flag, the name of the job for the `job` (`-j`) flag, and the path to the configuration file for the `config` (`-c`) flag:

    ```bash theme={null}
    wandb launch -j [JOB-NAME] -q [QUEUE-NAME] \
    -e [ENTITY-NAME] -c path/to/config.json
    ```

    If you work within a W\&B team, specify the `entity` flag (`-e`) to indicate which entity the queue uses.

    After the command succeeds, your job is added to the specified queue and runs on the queue's target resource.
  </Tab>
</Tabs>
