Versions Compared

Key

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

...

Name

Get-JobSchedulerTask

SYNOPSIS

Retrieves a number of Return information about tasks from the JobScheduler Master.

SYNTAX

Get-JobSchedulerTask [[-DirectoryJob] <String>] [[-JobJobChain] <String>] -NoRunningTasks -NoEnqueuedTasks -NoSubfolders [-U
seCache] <CommonParameters>[[-Directory] <String>] [-Recursive] [-Running] [-Enqueued] [<CommonParameters>]

DESCRIPTION

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

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

PARAMETERS

...

Job

-Directory Job <String>
Optionally specifies the folder with jobs path and name of a job 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
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

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

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

...

Directory

-NoRunningTasks <SwitchParameter>
Specifies that no running tasks should be stopped. By default running tasks will be stoppedDirectory <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

-NoEnqueuedTasks Recursive <SwitchParameter>
Specifies that no enqueued tasks sub-folders should be stoppedlooked up for jobs. By default enqueued tasks any sub-folders will be stoppedsearched for jobs with tasks.

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

...

true (ByPropertyName)
Accept wildcard characters?false

...

Running

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

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

...

true (ByPropertyName)
Accept wildcard characters?false

...

Enqueued

-UseCache Enqueued <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 Masterenqueued 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 --------------------------

C:\PS>$tasks PS > $tasks = Get-JobSchedulerTask

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

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

C:\PS>$tasks PS > $tasks = Get-JobSchedulerTask -Directory /my_jobs -NoSubfoldersRecursive

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

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

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

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