Skip to content

Commit

Permalink
Merge pull request dsccommunity#36 from BrianFarnhill/bug-scheduletas…
Browse files Browse the repository at this point in the history
…kdailytime

Fixed bug with different OS versions returning repeat interval differently
  • Loading branch information
narrieta authored Aug 3, 2016
2 parents 881326e + 7312308 commit 8ec8e4b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions DSCResources/MSFT_xScheduledTask/MSFT_xScheduledTask.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ function Get-TargetResource
$returnScheduleType = "Daily"
[System.Uint32]$returnInveral = $repetition.Interval -replace "P" -replace "D"
}
if ($repetition.Duration -eq $null -and $repetition.Interval -like "P*D*")
{
$returnScheduleType = "Daily"
[System.Uint32]$returnInveral = $repetition.Interval.Substring(0, $repetition.Interval.IndexOf('D')) -replace "P"
}
if (($repetition.Duration -eq "P1D" -or $repetition.Duration -eq $null) `
-and $repetition.Interval -like "PT*H")
{
Expand Down

0 comments on commit 8ec8e4b

Please sign in to comment.