Name
Stop-JobSchedulerMaster
SYNOPSIS
Stops a JobScheduler Master or a Master Cluster
SYNTAX
Stop-JobSchedulerMaster [[-Action] <String>] [-Restart] [-Cluster] [[-MasterHost] <String>] [[-MasterPort] <Int32>] [[-Timeout] <Int32>] [[-Pid] <Int32>] [-Service] [[-AuditComment] <String>] [[-AuditTimeSpent] <Int32>] [[-AuditTicketLink] <Uri>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
The stop of a Master or Master Cluster can be performed in a graceful manner leaving some time to
running tasks for completion. In addition more immediate operations for aborting
or killing a Master are available and Master instances can be restarted.
PARAMETERS
Action
-Action <String>
Stopping includes the following actions:
* Action "terminate" (Default)
** no new tasks are started.
** running tasks are continued to complete:
*** shell jobs will continue until their normal termination.
*** API jobs complete a current spooler_process() call.
** JobScheduler Master terminates normally.
* Action "terminate-fail-safe"
** terminates an instance in the same way as -Action "terminate".
** in addition in a Passive Cluster the backup instance will be activated after termination of the primary instance.
* Action "abort"
** no new tasks are started.
** any running tasks are killed.
** JobScheduler Master terminates normally.
* Action "kill"
** the process of the JobScheduler Master is killed including any tasks running.
** no cleanup is performed, e.g. database connections are not closed.
** this action might require elevated privileges of an administrator.
** this operation works on a single Master that is available from a local Master installation and requires prior use of the -UseJobSchedulerMaster cmdlet.
* Action "reactivate"
** performs a fail-back operation in a Master Cluster.
** the currently passive Master becomes active
** the currently active Master is restarted to become a passive cluster member.
Required? | false |
Position? | 1 |
Default value | terminate |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
Restart
-Restart <SwitchParameter>
When used with the operations -Action "terminate" and "abort" then the
JobScheduler Maser instance(s) will shut down and restart.
This switch can be used with the -Cluster switch to restart a JobScheduler Master Cluster.
Required? | false |
Position? | named |
Default value | False |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
Cluster
-Cluster <SwitchParameter>
Carries out the operation -Action "terminate" for a JobScheduler Master Cluster:
* All instances are terminated and optionally are restarted.
* Optional -Timeout settings apply to this operation.
Required? | false |
Position? | named |
Default value | False |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
MasterHost
-MasterHost <String>
Should the operation to terminate or to restart a Master not be applied to a standalone Master instance
or to the active Master instance in a cluster, but to a specific Master instance in a cluster
then the respective Master's hostname has to be specified.
Use of this parameter requires to specify the corresponding -MasterPort parameter.
This information is returned by the Get-JobSchedulerStatus cmdlet with the "Cluster" node information.
Required? | false |
Position? | 2 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
MasterPort
-MasterPort <Int32>
Should the operation to terminate or to restart a Master not be applied to a standalone Master instance
or to the active Master instance in a cluster, but to a specific Master instance in a cluster
then the respective Master's port has to be specified.
Use of this parameter requires to specify the corresponding -MasterHost parameter.
This information is returned by the Get-JobSchedulerStatus cmdlet with the "Cluster" node information.
Required? | false |
Position? | 3 |
Default value | 0 |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
Timeout
-Timeout <Int32>
A timeout is applied for the operation -Action "terminate" that affects running tasks:
* 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.
The timeout is applied when shutting down or restarting (-Restart switch) invidual instances or clustered instances (-Cluster switch).
Required? | false |
Position? | 4 |
Default value | 0 |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
Pid
-Pid <Int32>
When carrying out the operation -Action "kill" then
* with the PID being specified the given process will be killed
* with no PID being specified the PID is used from the PID file that is created on JobScheduler Master start.
Required? | false |
Position? | 5 |
Default value | 0 |
Accept pipeline input? | false |
Accept wildcard characters? | false |
Service
-Service <SwitchParameter>
Stops the JobScheduler Master Windows Service
Use of this parameter ignores any other parameters.
The Windows service is stopped as specified with -Action "terminate".
No timeout and no cluster operations are applied.
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? | 6 |
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? | 7 |
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? | 8 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
WhatIf
-WhatIf <SwitchParameter>
Required? | false |
Position? | named |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | false |
Confirm
-Confirm <SwitchParameter>
Required? | false |
Position? | named |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | false |
RELATED LINKS
EXAMPLES
-------------------------- EXAMPLE 1 --------------------------
PS > Stop-JobSchedulerMaster
Stops a standalone JobScheduler Master instance with normal termination. This is the same as the operation: Stop-JobSchedulerMaster -Action "terminate"
-------------------------- EXAMPLE 2 --------------------------
PS > Stop-JobSchedulerMaster -MasterHost localhost -MasterPort 40444
Stops a JobScheduler Master instance that is a member in a cluster with normal termination. This is the same as the operation: Stop-JobSchedulerMaster -Action "terminate"
-------------------------- EXAMPLE 3 --------------------------
PS > Stop-JobSchedulerMaster -Service
Stops the JobScheduler Master Windows Service with normal termination, i.e. with -Action "terminate" without any timeouts and cluster options being applied.
-------------------------- EXAMPLE 4 --------------------------
PS > Stop-JobSchedulerMaster -Action abort -Restart
Stops a standalone JobScheduler Master instance or the active member of a cluster by immediately killing any tasks and aborting the JobScheduler Master. After shutdown the JobScheduler Master instance is restarted.
-------------------------- EXAMPLE 5 --------------------------
PS > Stop-JobSchedulerMaster -Action kill -MasterHost localhost -MasterPort 40444
Kills the specific JobScheduler Master instance that is a member in a cluster and kills any tasks without proper cleanup.
-------------------------- EXAMPLE 6 --------------------------
PS > Stop-JobSchedulerMaster -Cluster -Timeout 30
Carries out the -Action "terminate" operation for all members of a JobScheduler Master Cluster. All running tasks are sent a SIGTERM signal and after expiration of the timeout any running tasks will be sent a SIGKILL signal.
-------------------------- EXAMPLE 7 --------------------------
PS > Stop-JobSchedulerMaster -Restart -Cluster -Timeout 30
Carries out the -Action "terminate" operation for all members of a JobScheduler Master Cluster. All running tasks are sent a SIGTERM signal and after expiration of the timeout any running tasks will be sent a SIGKILL signal. After termination all cluster members will be restarted.