Name

Get-JobSchedulerTask

SYNOPSIS

Retrieves a number of tasks from the JobScheduler Master.

SYNTAX

Get-JobSchedulerTask [[-Directory] <String>] [[-Job] <String>] [-NoRunningTasks] [-NoEnqueuedTasks] [-NoSubfolders] [-UseCache] [<CommonParameters>]

DESCRIPTION

Running and enqueued tasks are retrieved from a JobScheduler Master.
Tasks can be selected either by the folder of the job location including subfolders or by an individual job.

Resulting tasks can be forwarded to the Stop-JobSchedulerTask cmdlet in a bulk operation.

PARAMETERS

Directory

-Directory <String>
Optionally specifies the folder with jobs for which tasks should be returned. The directory is determined
from the root folder, i.e. the "live" directory.

One of the parameters -Directory and -Job has to be specified.

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

Job

-Job <String>
Optionally specifies the path and name of a job for which tasks should be returned.
If the name of a job is specified then the -Directory parameter is used to determine the job folder.
Otherwise the job is assumed to include the full path and name of the job.

One of the parameters -Directory and -Job has to be specified.

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

NoRunningTasks

-NoRunningTasks <SwitchParameter>
Specifies that no running tasks should be stopped. By default running tasks will be stopped.

Required?false
Position?named
Default valueFalse
Accept pipeline input?false
Accept wildcard characters?false

NoEnqueuedTasks

-NoEnqueuedTasks <SwitchParameter>
Specifies that no enqueued tasks should be stopped. By default enqueued tasks will be stopped.

Required?false
Position?named
Default valueFalse
Accept pipeline input?false
Accept wildcard characters?false

NoSubfolders

-NoSubfolders <SwitchParameter>
Specifies that no subfolders should be looked up for jobs. By default any subfolders will be searched for jobs with tasks.

Required?false
Position?named
Default valueFalse
Accept pipeline input?false
Accept wildcard characters?false

UseCache

-UseCache <SwitchParameter>
Specifies that the cache for JobScheduler objects is used. By default the chache is not used
as in most use cases the current information about running tasks is required from the JobScheduler Master.

Required?false
Position?named
Default valueFalse
Accept pipeline input?false
Accept wildcard characters?false

about_jobscheduler

EXAMPLES

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

PS > $tasks = Get-JobSchedulerTask

Returns all running and enqueued tasks for all jobs.

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

PS > $tasks = Get-JobSchedulerTask -Directory / -NoSubfolders

Returns all running and enqueued tasks that are configured with the root folder ("live" directory) without consideration of subfolders.

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

PS > $tasks = Get-JobSchedulerTask -Job /test/globals/job1

Returns all tasks for job "job1" from the folder "/test/globals".

  • No labels