From 288b3824ba6da0d7e29421a601118a3884ef76ad Mon Sep 17 00:00:00 2001 From: Dave Goldman <39909564+dgoldman-msft@users.noreply.github.com> Date: Tue, 29 Sep 2020 10:26:07 -0400 Subject: [PATCH 1/2] Updating formatting Fixing formatting --- demos/crontab/CronTab/CronTab.psm1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/demos/crontab/CronTab/CronTab.psm1 b/demos/crontab/CronTab/CronTab.psm1 index d354419c9bf..c08ca8e1dc3 100644 --- a/demos/crontab/CronTab/CronTab.psm1 +++ b/demos/crontab/CronTab/CronTab.psm1 @@ -77,16 +77,22 @@ function Remove-CronJob { <# .SYNOPSIS Removes the exactly matching cron job from the cron table + .DESCRIPTION Removes the exactly matching cron job from the cron table + .EXAMPLE Get-CronJob | Where-Object {%_.Command -like 'foo *'} | Remove-CronJob + .RETURNVALUE None + .PARAMETER UserName Optional parameter to specify a specific user's cron table + .PARAMETER Job Cron job object returned from Get-CronJob + .PARAMETER Force Don't prompt when removing the cron job #> From f49b0093ff4c233bbab7a520e086f64c505c2aee Mon Sep 17 00:00:00 2001 From: Dave Goldman <39909564+dgoldman-msft@users.noreply.github.com> Date: Tue, 29 Sep 2020 10:29:53 -0400 Subject: [PATCH 2/2] Update CronTab.psm1 --- demos/crontab/CronTab/CronTab.psm1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/demos/crontab/CronTab/CronTab.psm1 b/demos/crontab/CronTab/CronTab.psm1 index c08ca8e1dc3..4cb88e586b9 100644 --- a/demos/crontab/CronTab/CronTab.psm1 +++ b/demos/crontab/CronTab/CronTab.psm1 @@ -149,20 +149,28 @@ function New-CronJob { 0-23/2 or */2. .EXAMPLE New-CronJob -Minute 10-30 -Hour 10-20/2 -DayOfMonth */2 -Command "/bin/bash -c 'echo hello' > ~/hello" + .RETURNVALUE If successful, an object representing the cron job is returned + .PARAMETER UserName Optional parameter to specify a specific user's cron table + .PARAMETER Minute Valid values are 0 to 59. If not specified, defaults to *. + .PARAMETER Hour Valid values are 0-23. If not specified, defaults to *. + .PARAMETER DayOfMonth Valid values are 1-31. If not specified, defaults to *. + .PARAMETER Month Valid values are 1-12. If not specified, defaults to *. + .PARAMETER DayOfWeek Valid values are 0-7. 0 and 7 are both Sunday. If not specified, defaults to *. + .PARAMETER Command Command to execute at the scheduled time and day. #> @@ -196,12 +204,16 @@ 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 #>