Skip to content

Instantly share code, notes, and snippets.

View reijoh's full-sized avatar

Reidar Johansen reijoh

View GitHub Profile
@reijoh
reijoh / Test-CronExpression.ps1
Last active June 14, 2022 18:59 — forked from Badgerati/Test-CronExpression.ps1
PowerShell cron expression parser, to check if a date/time matches a cron expression
<#
.DESCRIPTION
PowerShell cron expression parser, to check if a date/time matches a cron expression
Format:
<min> <hour> <day-of-month> <month> <day-of-week>
.PARAMETER Expression
A cron expression to validate
.PARAMETER DateTime