Versions Compared

Key

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

...

Name

Update-JobSchedulerJob

SYNOPSIS

Stops Updates a number of jobs in the JobScheduler Master.

SYNTAX

Update-JobSchedulerJob [-Job] <String> [-Action] <String> [[-Parameters] <Hashtable>] [[-At] <String>] [<CommonParameters>]

DESCRIPTION

Stopping tasks Updating jobs includes operations to terminate tasks, e.g. by a SIGTERM signal, and to kill tasks immediately.Tasks stop and unstop jobs.

Jobs to be stopped are selected

* by a pipelined object, e.g. the output of the Get-

...

JobSchedulerJob cmdlet
* by specifying an individual

...

job with the

...

-Job

...

parameter.

PARAMETERS

Job

-Job <String>
Optionally specifies Specifies the path and name of a job for which tasks should be terminated. Both parameters -Id and -Job have to be specified if no pipelined task objects are usedthat should be updated.

Required?true
Position?1
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 "

...

stop"

...

  • 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.

...

  • 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.

** jobs are stopped immediately. Any running tasks are continued to completion.
** a stopped job does not execute any tasks. Orders in a job chain wait for stopped jobs to be resumed.

* Action "unstop"
** unstops a previously stopped job.

Required?true
Position?2
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

Parameters

-Parameters <Hashtable>
Specifies the parameters for the job. Parameters are created from a hashmap,
i.e. a list of names and values.

Required?false
Position?3
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

At

-At <String>
Specifies the point in time when the job should start:

* now
** specifies that the job should start immediately
* now+1800
** specifies that the job should start with a delay of 1800 seconds, i.e. 30 minutes later.
* yyyy-mm-dd HH:MM[:SS]
** specifies that the job should start at the specified point in time.

Default: now

  • Action "kill"
    • tasks are killed immediately.

...

Required?false
Position?4
Default valuenow
Accept pipeline input?
true (ByPropertyName)
Accept wildcard characters?false

about_jobscheduler

EXAMPLES

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

C:\PS>Stop-Task -Id 81073 -PS > Update-JobSchedulerJob -Job /sos/dailyschedule/CheckDaysSchedule -Action stop

Terminates Stops an individual taskjob.

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

C:\PS>Get-Task | Stop-Task

PS > Get-JobSchedulerJob | Update-JobSchedulerJob -Action unstop

Unstops all jobs that have previously been stoppedTerminates all running and enqueued tasks for all jobs.

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

C:\PS>Get-Task PS > Get-JobSchedulerJob -Directory /some_dir -NoSubfolders | StopUpdate-Task JobSchedulerJob -Action terminate -Timeout 30

Terminates all running and enqueued tasks 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-Task -Job /test/globals/job1 | Stop-Task

stop

Stops all jobs from the specified directory without consideration of subfoldersTerminates all tasks for job "job1" from the folder "/test/globals".