---
title: "How do I create a job?"
slug: "how-do-i-create-a-job"
tags: ["job", "automation"]
updated: 2024-08-22T07:22:03Z
published: 2024-08-22T07:22:03Z
canonical: "support.lusid.com/how-do-i-create-a-job"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.lusid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How do I create a job?

You can create a *job* to execute a particular Docker image on demand, for example an image containing a Python script to upsert transactions into LUSID from a CSV file.

You can optionally then [create a schedule](/v1/docs/how-do-i-create-a-schedule-to-automate-job-runs) to automatically trigger the job at chosen times.

To start the process of creating a new job:

1. Sign into the [LUSID web app](https://www.lusid.com/app/home) and select **Jobs & Scheduling > Jobs** from the left-hand menu: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/4ad02f27-99d8-4bab-889d-66dc6bfff0e1.png)
2. On the **Jobs** dashboard, click the **Create job** button (top right).
3. Specify a **Scope** and **Code** that together uniquely identify the job in your LUSID domain. ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/aeb5da45-60ba-48a3-a597-d08535b85141.png)
4. If not already done, [follow these instructions](/v1/docs/how-do-i-upload-a-docker-image-to-the-finbourne-aws-store) to upload your Docker image to the FINBOURNE AWS store. Upon returning to this screen, you should be able to select your image from the `Image name` and `Version` dropdowns: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/3ad37b71-a466-426a-836c-86bb5fd0d894.png)
5. On the **Arguments** screen, you can (optionally) define command line arguments to pass in to your job at runtime. In our example, we’ll add two arguments, passing in for each argument:
  - A `Name`, prefixed with `--`.
  - A `Data type` from the dropdown provided and a `Description`.
  - Whether or not the argument is `Mandatory`. In our example, both should be mandatory, since transactions must upsert to a transaction portfolio.
  - A `Default` value (which can be overridden by a user at runtime). ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/f47712cc-3785-41b0-99fb-7a3ac110cbd2.png)
6. On the **Arguments** screen, you can (optionally) define environment variables to pass in to your job at runtime. In our example, since we're exercising the LUSID API via the LUSID Python SDK, we'll use this facility to pass in credentials, so the SDK can obtain an API access token. We need to define the following environment variables:

| **Variable name** | **Source of the value** | **Data type** | **Example value** |
| --- | --- | --- | --- |
| `FBN_PASSWORD` | Configuration Store | `Configuration` | `config://personal/00u91lo2eeX42sdse2p7/lusid-sdks/python-sdk/account-password` |
| `FBN_USERNAME` | LUSID account username | `String` | `johndoe` |
| `FBN_CLIENT_SECRET` | Configuration Store | `Configuration` | `config://personal/00u91lo2eeX42sdse2p7/lusid-sdks/python-sdk/client-secret` |
| `FBN_CLIENT_ID` | Client ID of the application | `String` | `example-sdk-app` |
| `FBN_LUSID_API_URL` | LUSID domain URL | `String` | `https://acmecorp.lusid.com/api` |
| `FBN_TOKEN_URL` | Dedicated Okta token URL for LUSID domain | `String` | `https://lusid-acmecorp.okta.com/oauth2/aus91lnun55CZjjav2p7/v1/token` |

Account passwords and client secrets must be pulled in from the Configuration Store. [See how to upload these credentials to the Configuration Store.](/v1/docs/how-do-i-upload-information-to-the-configuration-store) Upon returning to this screen, select `Configuration` from the **Data type** dropdown and click in the **Default value key** area to be guided to select the appropriate configuration set and item (the `config://...` syntax is automatically generated). ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/70f3831a-b77d-407e-bc9b-d99f7719c582.png)
7. For now, the **Resources** tab can be safely skipped. Click **Save** to finish creating the job.

Once the job is created, you can trigger the job on demand by selecting **Run now**. [See how to monitor job runs and troubleshoot any failures.](/v1/docs/monitoring-job-run-history-and-troubleshooting-failures)

You can also create a schedule which triggers the job to run on a particular schedule with particular arguments. [See how to do this.](/v1/docs/how-do-i-create-a-schedule-to-automate-job-runs)
