Name

Get-JobSchedulerJobHistory

SYNOPSIS

Returns a number of JobScheduler history entries for jobs.

SYNTAX

Get-JobSchedulerJobHistory [[-Directory] <String>] [[-JobChain] <String>] [-Job] <String> [[-MaxHistoryEntries] <Int32>] [-WithLog] [<CommonParameters>]

DESCRIPTION

Job history entries are returned independently from the fact that the job is present in the JobScheduler Master.

Jobs are selected from a JobScheduler Master

* by the job chain that jobs are assigned to
* by an individual job.

PARAMETERS

Directory

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

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.

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

Job

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

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

MaxHistoryEntries

-MaxHistoryEntries <Int32>
Specifies the number of entries that are returned from the history. Entries are provided
in descending order starting with the latest history entry.

Default: 1

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

WithLog

-WithLog <SwitchParameter>
Specifies the task log to be returned.

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

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

about_jobscheduler

EXAMPLES

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

PS > $history = Get-JobSchedulerJobHistory -JobChain /test/globals/job_chain1 -Job /test/globals/job1

Returns the latest job history entry for the specified job that is associated with job chain "job_chain1" from the folder "/test/globals".

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

PS > $history = Get-JobSchedulerJobHistory -Job /test/globals/job1 -MaxHistoryEntries 5

Returns the latest 5 job history entries for job "job1" from the folder "/test/globals" and includes the log output.

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

PS > $history = Get-JobSchedulerJobHistory -Job /test/globals/job1 -MaxHistoryEntries -WithLog

Returns the latest 5 job history entries for job "job1" from the folder "/test/globals" and includes the log output.

  • No labels