< Summary - Kestrun — Combined Coverage

Information
Class: Public.Scheduling.Get-KrScheduleReport
Assembly: Kestrun.PowerShell.Public
File(s): /home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Scheduling/Get-KrScheduleReport.ps1
Tag: Kestrun/Kestrun@2d87023b37eb91155071c91dd3d6a2eeb3004705
Line coverage
0%
Covered lines: 0
Uncovered lines: 9
Coverable lines: 9
Total lines: 53
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 08/26/2025 - 01:25:22 Line coverage: 0% (0/13) Total lines: 59 Tag: Kestrun/Kestrun@07f821172e5dc3657f1be7e6818f18d6721cf38a09/04/2025 - 18:11:31 Line coverage: 0% (0/13) Total lines: 60 Tag: Kestrun/Kestrun@de99e24698289f3f61ac7b73e96092732ae12b0509/08/2025 - 20:34:03 Line coverage: 0% (0/15) Total lines: 65 Tag: Kestrun/Kestrun@3790ee5884494a7a2a829344a47743e0bf492e7210/13/2025 - 16:52:37 Line coverage: 0% (0/9) Total lines: 53 Tag: Kestrun/Kestrun@10d476bee71c71ad215bb8ab59f219887b5b4a5e

Metrics

File(s)

/home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Scheduling/Get-KrScheduleReport.ps1

#LineLine coverage
 1<#
 2    .SYNOPSIS
 3        Returns the full schedule report.
 4    .DESCRIPTION
 5        This function retrieves the current schedule report, including all scheduled jobs and their next run times.
 6    .PARAMETER Server
 7        The Kestrun host object containing the scheduler.
 8    .PARAMETER TimeZoneId
 9        Optional Windows / IANA time-zone id to convert timestamps.
 10        Example: "Pacific Standard Time"  or  "Europe/Berlin"
 11    .PARAMETER AsHashtable
 12        If set, returns a hashtable instead of a ScheduleReport object.
 13    .EXAMPLE
 14        Get-KrScheduleReport -Server $myServer
 15        Retrieves the schedule report from the specified Kestrun server.
 16    .EXAMPLE
 17        Get-KrScheduleReport -Server $myServer -TimeZoneId "Europe/Berlin"
 18        Retrieves the schedule report with timestamps converted to the specified time zone.
 19    .OUTPUTS
 20        Returns a ScheduleReport object or a hashtable if AsHashtable is set.
 21#>
 22function Get-KrScheduleReport {
 23    [KestrunRuntimeApi('Everywhere')]
 24    [CmdletBinding()]
 25    [OutputType([Kestrun.Scheduling.ScheduleReport])]
 26    [OutputType([Hashtable])]
 27    param(
 28        [Parameter(Mandatory = $false, ValueFromPipeline = $true)]
 29        [Kestrun.Hosting.KestrunHost]$Server,
 30        [string]$TimeZoneId,
 31        [switch]$AsHashtable
 32    )
 33    begin {
 34        # Ensure the server instance is resolved
 035        $Server = Resolve-KestrunServer -Server $Server
 36    }
 37    process {
 038        if (-not $Server.Scheduler) {
 039            throw 'SchedulerService is not enabled.'
 40        }
 41
 042        $tz = if ($TimeZoneId) {
 043            [TimeZoneInfo]::FindSystemTimeZoneById($TimeZoneId)
 044        } else { [TimeZoneInfo]::Utc }
 45
 046        if ($AsHashtable) {
 047            return $Server.Scheduler.GetReportHashtable($tz)
 48        } else {
 049            return $Server.Scheduler.GetReport($tz)
 50        }
 51    }
 52}
 53

Methods/Properties

Get-KrScheduleReport()