summaryrefslogtreecommitdiff
path: root/lib/chef/resource/cron.rb
diff options
context:
space:
mode:
authorJuri Timoshin <juri.timoshin@zeroturnaround.com>2013-08-31 18:22:53 +0300
committerBryan McLellan <btm@getchef.com>2014-03-20 13:06:29 -0700
commit91fd0a3190cba3409a67659acfd9dc44bb6f0000 (patch)
tree6c42c278ea405688e85feb73ff04a985eae99267 /lib/chef/resource/cron.rb
parentfb9391b81a3eeceff9c730a975a8583ae43fe048 (diff)
downloadchef-91fd0a3190cba3409a67659acfd9dc44bb6f0000.tar.gz
Enabled using special strings in cron. CHEF-2816
Diffstat (limited to 'lib/chef/resource/cron.rb')
-rw-r--r--lib/chef/resource/cron.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/chef/resource/cron.rb b/lib/chef/resource/cron.rb
index be70c8b5a0..9c04658bf3 100644
--- a/lib/chef/resource/cron.rb
+++ b/lib/chef/resource/cron.rb
@@ -43,6 +43,7 @@ class Chef
@path = nil
@shell = nil
@home = nil
+ @time = nil
@environment = {}
end
@@ -137,6 +138,14 @@ class Chef
:kind_of => [String, Symbol]
)
end
+
+ def time(arg=nil)
+ set_or_return(
+ :time,
+ arg,
+ :equal_to => Chef::Provider::Cron::SPECIAL_TIME_VALUES
+ )
+ end
def mailto(arg=nil)
set_or_return(