Date: Fri, 29 Mar 2024 00:11:27 +0000 (UTC) Message-ID: <917747195.12159.1711671087753@change.sos-berlin.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_12158_1375781383.1711671087753" ------=_Part_12158_1375781383.1711671087753 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Stop-JobSchedulerTask
Stops a number of tasks in the JobScheduler Master.
Stop-JobSchedulerTask [-Task] <String> [-Job] <String>=
; [[-Action] <String>] [[-Timeout] <Int32>] [<CommonParamete=
rs>]
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.
-Task <String>
Optionally specifies the identifier of a task.
Both parameters -Task and -Job have to be specified if no pipelined task ob=
jects are used.
Required? | true |
Position? | 1 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
-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 ob=
jects are used.
Required? | true |
Position? | 2 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
-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 o=
f 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 b=
y JobScheduler any more.
*** the task is expected to terminate normally after completion of its spoo=
ler_process() method.
* Action "kill"
** tasks are killed immediately.
Default: "kill"
Required? | false |
Position? | 3 |
Default value | kill |
Accept pipeline input? | false |
Accept wildcard characters? | false |
-Timeout <Int32>
Specifies a timeout to be applied when stopping a task by use of the param=
eter -Action with the value "terminate".
* For shell jobs
** in Unix environments the task is sent a SIGTERM signal and after expirat=
ion 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 time=
out then the task will be killed.
Required? | false |
Position? | 4 |
Default value | 10 |
Accept pipeline input? | false |
Accept wildcard characters? | false |
-------------------------- EXAMPLE 1 --------------------------
PS > Stop-JobSchedulerTask -Task 81073 -Job /sos/dailyschedule/=
CheckDaysSchedule
Terminates an individual task.
-------------------------- EXAMPLE 2 --------------------------
PS > Get-JobSchedulerTask | Stop-JobSchedulerTask
Terminates all running and enqueued tasks for all jobs.
-------------------------- EXAMPLE 3 --------------------------
PS > Get-JobSchedulerTask -Directory / -NoSubfolders | Stop-Job=
SchedulerTask -Action terminate -Timeout 30
Terminates all running and enqueued tasks that are configured with the r= oot 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 --------------------------
PS > Get-JobSchedulerTask -Job /test/globals/job1 | Stop-JobSch=
edulerTask
Terminates all tasks for job "job1" from the folder "/test/globals".