function Get-CronJob {
<#
.SYNOPSIS
Returns the current cron jobs from the cron table
.DESCRIPTION
Returns the current cron jobs from the cron table
.EXAMPLE
Get-CronJob -UserName Steve
.RETURNVALUE
CronJob objects
.PARAMETER UserName
Optional parameter to specify a specific user's cron table
#>
[CmdletBinding()]
[OutputType([PSObject])]
param (
[Alias("u")][Parameter(Mandatory=$false)][String] $UserName
)
process {
$crontab = Get-CronTab -user $UserName
ForEach ($line in $crontab) {
if ($line.Trim().Length -gt 0)
{
ConvertTo-CronJob -crontab $line
}
}
}
}
Get-CronJob -?
Expected behavior
help text
Actual behavior
syntax only
Environment data
v0.4.0
Get-CronJob -?
Expected behavior
help text
Actual behavior
syntax only
Environment data
v0.4.0