CLI: Job Schedulers



On This Page

 


The CLI references “skysync.” This is expected.

Job Schedulers

List Job Schedulers

parameter

description

required

default

parameter

description

required

default

search, q

Search text

optional

 

active

Only retrieve active job schedulers

optional

 

offset

Search offset

optional

0

limit

Search page size

optional

20

 

Example 1: List all the job schedulers

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  

Command

skysync-cli schedulers list

Example results

ID Name Caption Enabled Status -1 default Default Scheduler true running 1 system System Maintenance true running 2 local-10.0.75.1 Local scheduler for Node local-10.0.75.1 true running

Example results (JSON)

[ { "id": -1, "name": "default", "caption": "Default Scheduler", "disabled": false, "status": "running" }, { "id": 1, "name": "system", "caption": "System Maintenance", "disabled": false, "status": "running" }, { "id": 2, "name": "local-10.0.75.1", "caption": "Local scheduler for Node local-10.0.75.1", "disabled": false, "status": "running" } ]

 

Example 2: List active job schedulers

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  

Command

 

Example 4: List job schedulers with "Maint" in their name

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  

Command

 

Show a Job Scheduler

This command will show the details of the specified job.

parameter

description

required

default

parameter

description

required

default

id

The ID of the job scheduler for which details will be shown

required

 

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Command with variables

Command with example values

Example results

example results (JSON)

 

If the ID entered does not correspond to an existing job, for example, if the job was already deleted, the expected output is the following.

Expected results

Expected results (JSON)

 

Job Scheduler Status

It is important to note that any scheduler status returned from the API or any status control functions invoked through the API are specific to the local node that you are executing the request against. If the desire is to control the status of schedulers across an entire cluster, then the requests need to made against every node in the cluster individually.

Start Job Scheduler(s)

This command will start the specified job scheduler(s).  At least one job scheduler specification must be provided in order to start job schedulers.  If the ID is provided, that job scheduler will be started.  If any of the other parameters are provided, then those will be used to filter the entire job scheduler list and start the job schedulers based on the provided filtering parameters. 

parameter

description

required

default

parameter

description

required

default

id

The ID of the job scheduler to start

optional

 

all

Starts all the jobs

optional

 

search, q

Search text

optional

 

active

Only retrieve active job schedulers

optional

 

offset

Search offset

optional

0

limit

Search page size

optional

20

 

Example 1: Start a specific job scheduler by job scheduler ID

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Command with variables

Command with example values

Expected results

Expected results (JSON)

 

If the ID entered does not correspond to an existing job scheduler, the expected output is the following.

Expected results

Expected results (JSON)

 

Example 2: Starting all job schedulers

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Command with variables

Expected results

Expected results (JSON)

 

Example 3: Starting a filtered list of job schedulers

In the following example, we'll filter the job schedulers list by search text.  The authentication parameters are provided within the configuration file.  See the authentication section for more information.  The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Command with variables

 

Here, only job schedulers with the text "Maint" in their names will be started.

command with sample values

Expected results

Expected results (JSON)

 

Pause Job Scheduler(s)

This command will pause the specified job scheduler. This call will stop the scheduler from picking up any additional jobs but it will allow currently executing jobs to finish. The difference between pausing a scheduler and flat out stopping a scheduler with the "–wait" option is that this call will return immediately, while stopping with the "–wait" option will not return until all currently executing jobs will finish.

parameter

description

required

default

parameter

description

required

default

id

The ID of the job to pause

optional

 

all

Pause all the job schedulers

optional

 

search, q

Search text

optional

 

active

Only retrieve active job schedulers

optional

 

offset

Search offset

optional

0

limit

Search page size

optional

20

 

Example 1: Pause a specific job scheduler by job scheduler ID

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Command with variables

Command with example values

Expected results

Expected results (JSON)

 

If the ID entered does not correspond to an existing job scheduler, the expected output is the following.

Expected results

Expected results (JSON)

 

Example 2: Pausing all job schedulers

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Command with variables

Expected results

Expected results (JSON)

 

Example 3: Pausing a filtered list of job schedulers

In the following example, we'll filter the job schedulers list by search text.  The authentication parameters are provided within the configuration file.  See the authentication section for more information.  The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Command with variables

 

Here, only job schedulers with the text "Maint" in their names will be paused.
Command with sample values

Expected results

Expected results (JSON)

 

Stop Job Scheduler(s)

This command will stop the specified job scheduler. This call will stop the scheduler from picking up any additional jobs and terminate (or optionally wait for) currently executing jobs. Once this call returns, the currently executing jobs on this node are no longer running.

parameter

description

required

default

parameter

description

required

default

id

The ID of the job to stop

optional

 

all

Stop all the job schedulers

optional

 

search, q

Search text

optional

 

active

Only retrieve active job schedulers

optional

 

wait

Wait for currently executing jobs to finish

optional

 

offset

Search offset

optional

0

limit

Search page size

optional

20

Example 1: Stop a specific job scheduler by job scheduler ID

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Command with variables

Command with example values

Expected results

Expected results (JSON)

 

If the ID entered does not correspond to an existing job scheduler, the expected output is the following.

Expected results

Expected results (JSON)

 

 

Example 2: Stop all job schedulers

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Command with variables

Expected results

Expected results (JSON)

 

Example 3: Stopping a filtered list of job schedulers

In the following example, we'll filter the job schedulers list by search text. The authentication parameters are provided within the configuration file.  See the authentication section for more information. The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Command with variables

 

Here, only job schedulers with the text "Maint" in their names will be stopped.

Command with sample values

Expected results

Expected results (JSON)

 

DryvIQ Migrate Version: 5.6.3.4210
Release Date: April 4, 2024