1. Docs

Job

Job: Running Your Tasks

A Job is a single, live instance of a Job Definition. If a Job Definition is the blueprint, then a Job is the actual house being built. Every time you want to run a task—like processing a file or running a report—you create a new Job.

Each Job is sent to a Job Queue, which then finds a suitable server (from a Compute Environment) to run it on.


How to Create a Job

You can start a new job at any time from the Daestro Console.

  1. From the Dashboard, click on Add New Job.
  2. Fill out the form with the details for this specific run:
    • Name (Optional): You can give this specific job a unique name. If you leave it blank, Daestro will generate a random one for you.
    • Job Definition (Required): Select the blueprint for the task you want to run from the list of definitions you’ve already created.
    • Job Queue (Required): Choose which queue this job should be sent to. The queue determines the job’s priority and what kind of server it will run on.
    • Command (Optional): You can override the command from the Job Definition for this specific run.
    • Command Parameters (Optional): If your command uses placeholders, you can provide or override their values here.
    • Environment Variables (Optional): You can add or override environment variables for this specific job.
    • Schedule At (Optional): If you want the job to run later, you can pick a specific date and time. If you leave this blank, the job will start immediately.

Daestro Job Environment Variables

In each job Daestro injects some Daestro specific environment variables which are listed below:

DAESTRO_JOB_ID: Id of the running job.

DAESTRO_JOB_RUN_ID: Job run id of currently running job.

DAESTRO_JOB_QUEUE_NAME: Name of the job queue to which job belongs.

DAESTRO_COMPUTE_SPAWN_ID: Id of the compute spawn where job is running.

DAESTRO_COMPUTE_ENV_NAME: Name of the compute environment which is used to spawn the compute.

DAESTRO_CLOUD_PROVIDER: Name of the cloud provider where it’s running.

DAESTRO_INSTANCE_TYPE: Instance type code within the cloud provider.

DAESTRO_PUBLIC_IPV4: Public IPv4 address of the server.

DAESTRO_PUBLIC_IPV6: Public IPv6 address of the server.

It is not guaranteed that all keys mentioned above will be present.

How to Manage a Job

After a job is created, you can track its status and manage it from the Jobs page.

Cancel a Job

You can cancel a job if it’s no longer needed. A job can be cancelled only if its status is queued (waiting to run) or running. Once a job has finished, failed, or been cancelled, it cannot be cancelled again.

Re-submit a Job

You can easily run a job again by re-submitting it. This is useful if a job failed and you want to retry it, or if you just need to run the exact same task again. You can re-submit any job as long as it is not currently in the queue or running.