Versions Compared

Key

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

...

Name

Stop-JobSchedulerJobJobSchedulerTask

SYNOPSIS

Suspends Stops a number of orders tasks in the JobScheduler Master.

SYNTAX

Stop-JobSchedulerJob JobSchedulerTask [-Task] <String> [-Job] <String> [[-Directory <String>] <CommonParameters>

DESCRIPTION

This cmdlet is an alias for Update-Order -Action "suspend"

PARAMETERS

Job

-Job <String>

...

Action] <String>] [[-Timeout] <Int32>] [<CommonParameters>]

DESCRIPTION

Stopping tasks includes operations to terminate tasks, e.g. by a SIGTERM signal, and to kill tasks immediately.

Tasks to be stopped are selected

* by a pipelined object, e.g. the output of the Get-JobSchedulerTask cmdlet
* by specifying an individual task with the -Task and -Job parameters.

PARAMETERS

Task

-Task <String>
Optionally specifies the identifier of a task.

Both parameters -Task and -Job have to be specified if no pipelined task objects are used.

Required?true
Position?1
Default value
Accept pipeline input?true (

...

ByPropertyName)
Accept wildcard characters?

...

false

Job

-Directory <String>Job <String>
Optionally specifies the path and name of a job for which tasks should be terminated.

Both parameters -Task and -Job have to be specified if no pipelined task objects are used.

Required?

...

true
Position?2
Default value
Accept pipeline input?true (

...

ByPropertyName)
Accept wildcard characters?false

Action

-Action <String>
Specifies the action to be applied to stop a task:

* Action "terminate"
** For shell jobs
*** in a Unix environment the task is sent a SIGTERM signal and - in case of the timeout parameter being used -
after expiration of the timeout a SIGKILL signal is sent.
*** in a Windows environment the task is killed immediately.
** For API jobs
*** the method spooler_process() of the respective job will not be called by JobScheduler any more.
*** the task is expected to terminate normally after completion of its spooler_process() method.

* Action "kill"
** tasks are killed immediately.

Default: "kill"

Required?false
Position?3
Default valuekill
Accept pipeline input?false
Accept wildcard characters?false

Timeout

-Timeout <Int32>
Specifies a timeout to be applied when stopping a task by use of the parameter -Action with the value "terminate".

* For shell jobs
** in Unix environments the task is sent a SIGTERM signal and after expiration of the timeout a SIGKILL signal is sent.
** in Windows environments the timeout is ignored.
* For API jobs
** the method spooler_process() of the respective job will not be called by JobScheduler any more.
** should the job not complete its spooler_process() method within the timeout then the task will be killed.

Required?false
Position?4
Default value10
Accept pipeline input?false
Accept wildcard characters?false

about_jobscheduler

EXAMPLES

-------------------------- EXAMPLE 1 --------------------------

C:\PS>Suspend-Order -Order Reporting -JobChain PS > Stop-JobSchedulerTask -Task 81073 -Job /sos/reportingdailyschedule/ReportingCheckDaysSchedule

Terminates an individual taskSuspends the order "Reporting" from the specified job chain.

-------------------------- EXAMPLE 2 --------------------------

C:\PS>Get-Order | Suspend-Order

PS > Get-JobSchedulerTask | Stop-JobSchedulerTask

Terminates all running and enqueued tasks for all jobsSuspends all orders for all job chains.

-------------------------- EXAMPLE 3 --------------------------

C:\PS>Get-Order PS > Get-JobSchedulerTask -Directory / -NoSubfolders | Suspend-OrderStop-JobSchedulerTask -Action terminate -Timeout 30

Terminates all running and enqueued tasks Suspends orders that are configured with the root folder ("live" directory)
without consideration of subfolders. For Unix environments tasks are sent a SIGTERM signal and after expiration of 30s a SIGKILL signal.

-------------------------- EXAMPLE 4 --------------------------

C:\PS>Get-Order -JobChain PS > Get-JobSchedulerTask -Job /test/globals/chain1 job1 | SuspendStop-OrderJobSchedulerTask

Suspends Terminates all orders tasks for the specified job chainjob "job1" from the folder "/test/globals".