Get-HpcJobHistory
Gets the job history data for all finished, canceled, and failed jobs for the specified time period. You can export this information to a database and create and run reports on the information.
Syntax
Get-HpcJobHistory [-StartDate] <DateTime> [-EndDate] <DateTime> [<CommonParameters>]
Detailed Description
Gets the job history data for all finished, canceled, and failed jobs for the specified time period. You can export this information to a database and create and run reports on the information. The time period is on and after the specified start date and before the specified end date.
You can schedule this cmdlet to run daily and export the job history to a database. You can then use this database to track job history.
Parameters
-EndDate <DateTime>
Specifies a DateTime object or a date string that is compatible with the current date format on your computer for the end date and time for the time period for which you want to retrieve the job history. Use the Get-Date cmdlet to get a DateTime object for a date and time.
|
Required? |
true |
|
Position? |
2 |
|
Default Value |
no default |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
-StartDate <DateTime>
Specifies a DateTime object or a date string that is compatible with the current date format on your computer for the start date and time for the time period for which you want to retrieve the job history. Use the Get-Date cmdlet to get a DateTime object for a date and time.
|
Required? |
true |
|
Position? |
1 |
|
Default Value |
no default |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Input and Return Types
The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.
|
Input Type |
None. |
|
Return Type |
One or more HpcJobHistory objects. |
Notes
Each job can be submitted and resubmitted several times.
Example 1
C:\PS>Get-HpcJobHistory -StartDate (Get-Date).AddDays(-1) -EndDate (Get-Date)
Gets the job history for the past day. Run this cmdlet daily at midnight or some other appropriate time to update the database that you use to track job history.
Example 2
C:\PS>Get-HpcJobHistory -StartDate "7/12/2008 12:00:00 AM" -EndDate "7/23/2008 12:00:00 AM"
Gets the job history for the period on and after 7/12/2008 and before 7/23/2008.