Skip to content

Instantly share code, notes, and snippets.

View mmunchandersen's full-sized avatar

Morten Munch-Andersen mmunchandersen

View GitHub Profile
@mmunchandersen
mmunchandersen / Test-CronExpression.ps1
Created June 13, 2022 20:11 — 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