Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
minLevel1
maxLevel7
exclude.*\.[5//6]

...

Executing Jobs On Demand:

The purpose of scheduled jobs is to perform a task at predetermined schedule like once in a week, every night at 11 pm or every minute. However, at times, you would like to trigger the scheduled job execution on demand especially when using the jobs to retrieve the data for integration with the other external systems.

...

Parameter

Description

jobId

ID of the scheduled job to run / queue for execution.

Scheduled Job ID is a unique identifier assigned to every scheduled job in OpenSpecimen. This ID can be obtained from Jobs view UI.

args

Space separated list of input arguments to the job. This can be empty if the job has no run time arguments as the input

...

Job Runs

Whenever a scheduled job is executed, it creates scheduled job run. The idea of a run record is to capture the details of execution like when the job was executed, who executed it, and output of the execution, if any.

...

Parameter

Description

jobId

Scheduled Job ID whose run records are required. This is a required parameter.

fromDate

Specifies the date/time after which the scheduled job run was created. This is an optional parameter.

When not specified, it defaults to the earliest date/time known to the mankind.

Example:

a) 20220221 (only date - 21st Feb 2022)

b) 20220221T061500 (date and time - 21st Feb 2022 6:15 am)

toDate

Specifies the date/time before which the scheduled job run was created. This is an optional parameter.

When not specified, it defaults to the current date/time.

Follows the same format as fromDate.

status

One of the 3 values given below. This is an optional parameter. When not specified, it is assumed job runs of all statuses are required.

IN_PROGRESS: Job runs that are still executing. At any given point in time, a job should have a single IN_PROGRESS job run!

SUCCEEDED: Job runs that completed without any errors.

FAILED: Job runs that completed with one or more errors.

Download the

...

Job Run Output

Some scheduled jobs like the saved query jobs created an output CSV file. The resultant CSV file can be downloaded using the API given below:

...