(cli:jobs)=
# Work Execution Service (WES) subcommands

```{list-table} Jobs subcommands
:header-rows: 1

* - Subcommand
  - Description
  - Argument
* - `dryrun`
  - Workflow dry run to see if the given request.json files are properly configured by calling `seqslab-api/wes/runs/dryrun` and `seqslab-api/wes/runs/files` API.
  - `working-dir (dir)`  
  Specify the working directory path that contains request.json (required).  
* - `get`
  - Get WES run information based on run ID.
  - `run-id STR`  
  Specify a previously executed WES run ID (required).  
* - `request`
  - Create WES run request.
  - `run-name STR (name)`  
  Define the run name for a single run (required).  
  `working-dir (dir)`  
  Specify the absolute output directory for generated jobs `request.json` (required).  
  `workflow-url (url)`  
  Specify a TRS URL used for a single run (required).  
  `execs STR`  
  Specify the `execs.json` needed to create a WES request. If not given, the command will get the `execs.json` from the TRS object specified by the workflow-url (optional, default = None).  
  `runtimes STR`
  String of key-value pairs using `:` as a separator, indicating the execution runtimes for each task or workflow defined 
  in workflow-url. For example, Main=m4-cluster:Main>Fq2Bam=m4-8xcluster. To list tasks/workflows for a given workflow, 
  use the `execs command`. To find available runtime options, use the `request runtimes-options` command. (Optional, 
  defaults to None, which runs the entire workflow using m4-cluster.)  
  `integrity`  
  Specify whether to enable data and runtime integrity check for the workflow engine (optional, default = False).   
  `trust`  
  Specify whether to enable content trust for container runtime (optional, default = False).  
  `token_lifetime`
  Specify the duration, in hours, for the SeqsLab API token lifespan for this run (optional, default = 2).  
  `labels`
  Specify labels for the run; multiple labels can be given with whitespaces as separators (optional).  
* - `request-runsheet` (runsheet)
  - Parse `run_sheet.csv` and create a job execution `request.json` file for each job run.
  - `working-dir STR`, `-o STR`  
  Specify the absolute output directory for generated jobs `request.json` (required).  
  `run-sheet STR (-r)`  
  Specify the absolute output path for Run Sheet (required).  
  `execs STR`  
  Specify the `execs.json` needed for create WES request. If not given, the command will get the `execs.json` from the TRS object specified by the workflow-url (optional, default = None).  
  `integrity`  
  Specify whether to enable data and runtime integrity check for the workflow engine (optional, default = False).   
  `trust`  
  Specify whether to enable content trust for container runtime (optional, default = False).    
  `fastq_signature STR`   
  Define a fastq path matching pattern using `~{}` wrapping syntax for Runsheet column names. For example, `~{Sample_Name}_S~{Sample_ID}` matches `NA12878_S1.fastq.gz` with Sample_Name as `NA12878` and Sample_ID as `1` (optional, defaulting to `~{Sample_ID}`).    
  `token_lifetime`
  Specify the duration, in hours, for the SeqsLab API token lifespan for this run (optional, default = 2).  
  `seq-run-id`
  Specify a runsheet header field as a sequencer run identifier; the specified value will be used as a sequencer run specific label for future jobs management (optional).  
* - `rerun`
  - Rerun an existing run by calling the seqslab-api/wes/runs API.
  - `rerun-id`  
   Specify the run-id that is going to be rerun (required).  
* - `run`
  - Run a workflow by calling the `seqslab-api/wes/runs` API.
  - `working-dir (dir)`  
   Specify the working directory path that contains `request.json` (optional).  
   `workspace STR`  
   Specify the workspace based on the signed in account (required).  
   `response-path STR`  
   Specify the path of `response.json` in relation to the working directory (optional).
   `request-path STR`
   Specify the request.json file to run (optional).
* - `run-state` (state)
  - Get WES run information based on run ID.
  - `run-id STR`  
  Specify a previously executed WES run ID.  
* - `schedule`
  - Schedule a WES run with given date, time, and recurrence.  
  - `request-path STR`  
   Specify a previously scheduled run request ID (required).  
   `date STR`  
   Specify the schedule date, in the format of YYYY-MM-DD (required).
   `time STR`  
   Specify the schedule time, in the format of HH-MM (required).
   `time-zone {UTC,LOCAL} `  
   Specify the time zone for the provided date and time. If `LOCAL` is selected, the date and time will be 
   interpreted according to the operating system's time zone. (optional, default = UTC).      
   `workspace STR`  
   Specify the workspace based on the signed in account (required).
* - `runtime-options` (rt)
  - List registered cluster runtimes settings.
  - `output {json,table}`
  Specify the output format of the stdout file (optional, default = json).  
  `page`
  Specify the page number in the set of paginated records (optional, default = 1).  
  `page-size`
  Specify the number of records to return in each page (optional, default = 10).
* - `operator-pipelines` (op)
  - List registered operator pipelines.
  - `output {json,table}`
  Specify the output format of the stdout file (optional, default = json).  
  `page`
  Specify the page number in the set of paginated records (optional, default = 1).  
  `page-size`
  Specify the number of records to return in each page (optional, default = 10).
* - `detail`
  - Get WES run detail_config.json with a run ID.
  - `run-id STR`  
  Specify a previously executed WES run ID (required).    
  `output-path STR`  
  Specify the absolute output path for keeping the WES run detail_config.json. If not given, the command will return the detail_config.json to stdout (optional).  
* - `cancel`
  - Cancel WES run based on run ID.
  - `run-id STR`  
  Specify the run_id that is going to be cancelled (required).    
* - `delete`
  - Delete WES run as well as all the generated output files based on run ID.
  - `run-id STR`  
  Specify the run_id that is going to be delete (required).      
```