Name

Get-JobSchedulerTask

SYNOPSIS

Return information about tasks from the JobScheduler Master.

SYNTAX

Get-JobSchedulerTask [[-Job] <String>] [[-JobChain] <String>] [[-Directory] <String>] [-Recursive] [-Running] [-Enqueued] [<CommonParameters>]

DESCRIPTION

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

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

PARAMETERS

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.

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

JobChain

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

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

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 or -Job has to be specified.

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

Recursive

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

Required?false
Position?named
Default valueFalse
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

Running

-Running <SwitchParameter>
Specifies that running tasks should be returned.

Required?false
Position?named
Default valueFalse
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

Enqueued

-Enqueued <SwitchParameter>
Specifies that enqueued tasks should be returned. By default no enqueued tasks arre returned.

Required?false
Position?named
Default valueFalse
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

about_JobScheduler

EXAMPLES

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

PS > $tasks = Get-JobSchedulerTask

Returns all running and enqueued tasks for jobs from any folders recursively.

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

PS > $tasks = Get-JobSchedulerTask -Directory /my_jobs -Recursive

Returns all running and enqueued tasks that are configured with the folder "my_jobs" recursively.

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

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

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

  • No labels