Name
Stop-JobSchedulerMaster
SYNOPSIS
Stops a JobScheduler Master
SYNTAX
Stop-JobSchedulerMaster [[-Action] <String>] [-Restart] [-Cluster] [[-Timeout] <Int32>] [[-Pid] <Int32>] [-Service] [<CommonParameters>]
DESCRIPTION
The stopping of a Master 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.
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 instance will shut down and restart.
This switch can be used with the -Cluster swith to restart a JobScheduler 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 Cluster:
* All instances are terminated and optionally restarted.
* Optional -Timeout settings apply to this operation.
Required? | false |
Position? | named |
Default value | False |
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? | 2 |
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 start.
Required? | false |
Position? | 3 |
Default value | 0 |
Accept pipeline input? | false |
Accept wildcard characters? | false |
Service
-Service <SwitchParameter>
Stops the JobScheduler 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 |
RELATED LINKS
EXAMPLES
-------------------------- EXAMPLE 1 --------------------------
PS > Stop-JobSchedulerMaster
Stops the JobScheduler instance with normal termination. This is the same as the operation: Stop-Instance -Action "terminate"
-------------------------- EXAMPLE 2 --------------------------
PS > Stop-JobSchedulerMaster -Service
Stops the JobScheduler Windows service with normal termination, i.e. with -Action "terminate" without any timeouts and cluster options being applied.
-------------------------- EXAMPLE 3 --------------------------
PS > Stop-JobSchedulerMaster -Action abort -Restart
Stops the JobScheduler instance by immediately killing any tasks and aborting the JobScheduler Master. After shutdown the JobScheduler instance is restarted.
-------------------------- EXAMPLE 4 --------------------------
PS > Stop-JobSchedulerMaster -Action kill
Kills the JobScheduler process and any tasks without proper cleanup.
-------------------------- EXAMPLE 5 --------------------------
PS > Stop-JobSchedulerMaster -Cluster -Timeout 30
Carries out the -Action "terminate" operation for all members of a JobScheduler 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 6 --------------------------
PS > Stop-JobSchedulerMaster -Restart -Cluster -Timeout 30
Carries out the -Action "terminate" operation for all members of a JobScheduler 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 willl be restarted.