diff options
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/type/cron.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/type/cron.rb b/lib/puppet/type/cron.rb index 3a106c4..fada980 100644 --- a/lib/puppet/type/cron.rb +++ b/lib/puppet/type/cron.rb @@ -156,8 +156,8 @@ Puppet::Type.newtype(:cron) do return :absent end - # Allow the */2 syntax - if value =~ /^\*\/[0-9]+$/ + # Allow step syntax + if value =~ %r{^\*/[0-9]+$} return value end @@ -166,8 +166,8 @@ Puppet::Type.newtype(:cron) do return value end - # Allow ranges + */2 - if value =~ /^[0-9]+-[0-9]+\/[0-9]+$/ + # Allow ranges with step + if value =~ %r{^[0-9]+-[0-9]+/[0-9]+$} return value end |