Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »



On This Page


Job Schedulers

List Job Schedulers

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

skysync-cli schedulers list --active

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

skysync-cli schedulers list --search Maint

Show a Job Scheduler

This command will show the details of the specified job.

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

skysync-cli schedulers show {{id}}

Command with example values

skysync-cli schedulers show 1

Example results

ID      1
Name    system
Caption System Maintenance
Enabled true
Status  running

example results (JSON)

[
  {
    "id": 1,
    "name": "system",
    "caption": "System Maintenance",
    "disabled": false,
    "status": "running"
  }
]

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

ID
Name
Caption
Enabled true
Status

Expected results (JSON)

null

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

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

skysync-cli schedulers start {{id}}

Command with example values

skysync-cli schedulers start 1

Expected results

ID      1
Name    system
Caption System Maintenance
Enabled true
Status  running

Expected results (JSON)

[
  {
    "id": 1,
    "name": "system",
    "caption": "System Maintenance",
    "disabled": false,
    "status": "running"
  }
]

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

Expected results

ID
Name
Caption
Enabled true
Status

Expected results (JSON)

null

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

skysync-cli schedulers start --all

Expected results

3 job schedulers started

Expected results (JSON)

[
  {
    "total_count": "3"
  }
]

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

skysync-cli schedulers start --search={{searchText}}

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

command with sample values

skysync-cli schedulers start --search=Maint

Expected results

1 job scheduler started

Expected results (JSON)

[
  {
    "total_count": "1"
  }
]

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

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

skysync-cli schedulers pause {{id}}

Command with example values

skysync-cli schedulers pause 1

Expected results

ID      1
Name    system
Caption System Maintenance
Enabled true
Status  paused

Expected results (JSON)

[
  {
    "id": 1,
    "name": "system",
    "caption": "System Maintenance",
    "disabled": false,
    "status": "paused"
  }
]

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

Expected results

ID
Name
Kind
Enabled true
Status

Expected results (JSON)

null

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

skysync-cli schedulers pause --all

Expected results

3 job schedulers paused

Expected results (JSON)

[
  {
    "total_count": "3"
  }
]

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

skysync-cli schedulers pause --search={{searchText}}

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

skysync-cli schedulers pause --search=Maint

Expected results

1 job schedulers paused

Expected results (JSON)

[
  {
    "total_count": "1"
  }
]

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

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

skysync-cli schedulers stop {{id}} --wait

Command with example values

skysync-cli schedulers stop 1 --wait

Expected results

ID      1
Name    system
Caption System Maintenance
Enabled true
Status  stop

Expected results (JSON)

[
  {
    "id": 1,
    "name": "system",
    "caption": "System Maintenance",
    "disabled": false,
    "status": "stop"
  }
]

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

Expected results

ID
Name
Kind
Enabled true
Status

Expected results (JSON)

null

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

skysync-cli schedulers stop --all --wait

Expected results

3 job schedulers stopped

Expected results (JSON)

[
  {
    "total_count": "3"
  }
]

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

skysync-cli schedulers stop --search={{searchText}}

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

Command with sample values

skysync-cli schedulers stop --search=Maint

Expected results

1 job schedulers stopped

Expected results (JSON)

[
  {
    "total_count": "1"
  }
]

  • No labels