Versions Compared

Key

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

...

Name

Get-JobSchedulerJob

SYNOPSIS

Returns a number of jobs job information from the JobScheduler Master.

SYNTAX

Get-JobSchedulerJob [[-DirectoryJob] <String>] [[-JobChain] <String>] [[-Job <String>] -WithLog -NoSubfolders [-Stopp
ed] -RunningTasks -EnqueuedTasks -NoCache <CommonParameters>Directory] <String>] [-Recursive] [-Compact] [-WithHistory] [-WithLog] [[-MaxLastHistoryItems] <Int32>] [-IsOrderJob] [-IsStandaloneJob] [-Pending] [-Stopped] [-WaitingForResource] [-Running] [-Enqueued] [<CommonParameters>]

DESCRIPTION

Jobs are retrieved returned from a JobScheduler Master.
Jobs can be selected either by the folder of the job location including subfolders or by an individual job.name, folder, status etc. including sub-folders.

The job information retured includes volatile status information and the permanent configuration.
The cmdlet optionally returns the task history and logs of recent task executions.

Resulting jobs can be forwarded to other cmdlets for pipelined bulk operations.

PARAMETERS

...

Job

-Directory Job <String>
Optionally specifies the folder for which jobs should be returned. The directory is determined
from the root folder, i.e. the "live" directorypath and name of a job.
If the name of a job is specified then the -Directory parameter is used to determine the folder.
Otherwise the -Job parameter is assumed to include the full path and name of the job.

One of the parameters -Directory, -JobChain or -Job has to be specified.

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 that includes jobs.
If the name of a job chain is specified then the -Directory parameter is used to determine the folder.
Otherwise the -JobChain parameter is assumed to include the full path and name of the job chain.

One of the parameters -Directory, -JobChain or -Job has to be specified.

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

...

Directory

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

One of the parameters -Directory, -JobChain or -Job has to be specified.

...

folder for which jobs should be returned. The directory is determined
from the root folder, i.e. the "live" directory.

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

Recursive

-Recursive <SwitchParameter>
Specifies that any sub-folders should be looked up when used with the -Directory parameter.
By default no sub-folders will be looked up for jobs.

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

Compact

-Compact <SwitchParameter>
Specifies that a smaller subset of information is provided, e.g. no task queues for jobs.
By default all information available for jobs is returned.

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

...

WithHistory

-WithLog WithHistory <SwitchParameter>
Specifies the task log history to be returned.
The parameter -MaxLastHstoryitems specifies the number of history items returned.

This operation is time-consuming and should be restricted to selecting individual jobs.

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

...

true (ByPropertyName)
Accept wildcard characters?

...

false

WithLog

-NoSubfolders WithLog <SwitchParameter>
Specifies that no subfolders should be looked up. By default any subfolders will be searched for jobsthe task log to be returned. This implicitely includes to return the task history.
For each history item - up to the number speicifed with the -MaxLastHistoryItems parameter -
the task log is returned.

This operation can be time-consuming.

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

MaxLastHistoryItems

-MaxLastHistoryItems <Int32>
Specifies the number of the most recent history items of task executions to be returned.

Default: 1

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

...

false

IsOrderJob

-Stopped IsOrderJob <SwitchParameter>
Specifies that only stopped jobs should be returned.to exclusively return jobs that can be used in job chains.

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

IsStandaloneJob

-IsStandaloneJob <SwitchParameter>
Specifies to exclucively return jobs that can be used standalone (without job chains)This parameter cannot be combined with -JobChain, -RunningTasks, -EnqueuedTasks.

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

...

true (ByPropertyName)
Accept wildcard characters?

...

false

Pending

-RunningTasks Pending <SwitchParameter>
Specifies that only jobs with running tasks should be returned. Returns jobs in a pending state, i.e. jobs that are ready to be executed at a later date.

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

Stopped

-Stopped <SwitchParameter>
Returns stopped jobs. Such jobs would not restart automaticallyThis parameter cannot be combined with -Stopped and -EnqueuedTasks.

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

WaitingForResource

-WaitingForResource <SwitchParameter>

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

...

false

Running

-EnqueuedTasks Running <SwitchParameter>
Specifies that only jobs with enqueued running tasks should be returned.This parameter cannot be combined with -Stopped and -RunningTasks.

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

...

true (ByPropertyName)
Accept wildcard characters?

...

false

Enqueued

-NoCache Enqueued <SwitchParameter>
Specifies that the cache for JobScheduler objects is ignored.
This results in the fact that for each Get-JobScheduler* cmdlet execution the response is
retrieved directly from the JobScheduler Master and is not resolved from the cachejobs with enqueued tasks should be returned.

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

...

true (ByPropertyName)
Accept wildcard characters?false

about_jobscheduler

EXAMPLES

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

C:\PS>$jobs PS > $jobs = Get-JobSchedulerJob

Returns all jobs from all directories recursively.

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

C:\PS>$jobs PS > $jobs = Get-JobSchedulerJob -Directory / -NoSubfolderstest

Returns all jobs that are configured with the root folder ( "livetest" directory)
without consideration of subfolderssub-folders.

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

PS > $jobs = Get-JobSchedulerJob -Directory /test -Recursive

Returns all jobs that are configured with the folder "test" include jobs from any sub-folders.

-------------------------- EXAMPLE 4 --------------------------

PS > $jobs C:\PS>$jobs = Get-JobSchedulerJob -JobChain /test/globals/job_chain1

Returns the jobs that are associated with the job chain "job_chain1" from the folder "/test/globals".

-------------------------- EXAMPLE 4 5 --------------------------

C:\PS>$jobs PS > $jobs = Get-JobSchedulerJob -Job /test/globals/job1

Returns the job "job1" from the folder "/test/globals".

-------------------------- EXAMPLE 6 --------------------------

PS > $jobs = Get-JobSchedulerJob -Stopped

Returns any stopped jobs.

-------------------------- EXAMPLE 7 --------------------------

PS > $jobs = Get-JobSchedulerJob -Directory /test -Pending -Running

Returns any pending or running jobs from the "/test" directory.