...
Name
Stop-JobSchedulerTask
SYNOPSIS
Stops a number of tasks in the JobScheduler Master.
SYNTAX
Stop-JobSchedulerTask [[-
TaskJob] <String>] [[-
Job <String> [-Action <String>] [-Timeout <Int32>] <CommonParameters>Directory] <String>] [[-Tasks] <PSObject[]>] [[-Timeout] <Int32>] [-Terminate] [[-AuditComment] <String>] [[-AuditTimeSpent] <Int32>] [[-AuditTicketLink] <Uri>] [<CommonParameters>]
DESCRIPTION
Stopping tasks includes operations to terminate tasks , e.g. by use of a SIGTERM signal, and to kill tasks immediately with a SIGKILL signal.
Tasks to be stopped are selected
* by a pipelined object, e.g. the output of the Get-JobSchedulerTask
...
or Get-JobSchedulerJob cmdlets.
* by specifying an individual task with the -Task and -Job parameters.
PARAMETERS
...
Job
-
Task Job <String>
Optionally specifies the identifier path and name of a taskjob for which tasks should be terminated.
Both parameters -Task and -Job have to be specified if no pipelined task objects are used.
Required? |
...
false | |
Position? | 1 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...
Directory
-
Job Directory <String>
Optionally specifies the path and name of a job folder for which tasks jobs should be terminatedstopped. Both parameters -Task and -Job have to be specified if no pipelined task objects are usedThe directory is determined
from the root folder, i.e. the "live" directory.
Required? |
...
false | |
Position? | 2 |
Default value | / |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...
Tasks
-
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.
- in a Unix environment the task is sent a SIGTERM signal and - in case of the timeout parameter being used -
- 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.
- For shell jobs
- Action "kill"
- tasks are killed immediately.
Default: "kill"
...
Tasks <PSObject[]>
Optionally specifies the identifier of a task that includes the properties "path" and "taskId".
Task information as returned by the Get-JobSchedulerJob and Get-JobSchedulerTask cmdlets can
be used for pipelined input into this cmdlet.
Required? | false |
Position? | 3 |
Default value | |
Accept pipeline input? |
...
true (ByValue, ByPropertyName) | |
Accept wildcard characters? | false |
Timeout
-Timeout <Int32>
Specifies a timeout to be applied when stopping a task by use of without using the parameter -Action with the value "terminate"Kill.
* 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 value | 0 |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
Terminate
-Terminate <SwitchParameter>
Specifies that tasks should not be killed immediately. Instead a SIGTERM signal is sent
and optionally the -Timeout parameter is considered.
This parameter is applicable for jobs running on Unix environments only.
Required? | false |
Position? | named |
Default value | False |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
AuditComment
-AuditComment <String>
Specifies a free text that indicates the reason for the current intervention,
e.g. "business requirement", "maintenance window" etc.
The Audit Comment is visible from the Audit Log view of JOC Cockpit.
This parameter is not mandatory, however, JOC Cockpit can be configured
to enforece Audit Log comments for any interventions.
Required? | false |
Position? | 5 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
AuditTimeSpent
-AuditTimeSpent <Int32>
Specifies the duration in minutes that the current intervention required.
This information is visible with the Audit Log view. It can be useful when integrated
with a ticket system that logs the time spent on interventions with JobScheduler.
Required? | false |
Position? | 6 |
Default value | 0 |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
AuditTicketLink
-AuditTicketLink <Uri>
Specifies a URL to a ticket system that keeps track of any interventions performed for JobScheduler.
This information is visible with the Audit Log view of JOC Cockpit.
It can be useful when integrated with a ticket system that logs interventions with JobScheduler.
Required? | false |
Position? | 7 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
RELATED LINKS
EXAMPLES
-------------------------- EXAMPLE 1 --------------------------
C:\PS>StopPS > Get-JobSchedulerTask -
Task 81073 -Job /sos/dailyschedule/CheckDaysSchedule
Terminates an individual task.
-------------------------- EXAMPLE 2 --------------------------
C:\PS>Get-JobSchedulerTask Running -Enqueued | Stop-JobSchedulerTask
Terminates Kills all running and enqueued tasks for all jobs.
-------------------------- EXAMPLE 3 2 --------------------------
C:\PS>GetPS > Get-JobSchedulerTask -Directory /
-NoSubfolders some_path -Recursive -Running -Enqueued | Stop-JobSchedulerTask -
Action terminate Terminate -Timeout 30
Terminates all running and enqueued tasks that are configured with the root folder ( "live" directory)
without consideration of subfolders.some_path" and any sub-folders. For Unix environments tasks are sent a SIGTERM signal and after expiration of 30s a SIGKILL signal is sent.
-------------------------- EXAMPLE 4 3 --------------------------
C:\PS>GetPS > Get-JobSchedulerTask -Job /test/globals/job1 | Stop-JobSchedulerTask
Terminates Kills all running tasks for job "job1" from the folder "/test/globals".