summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/resource/cron_d.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/chef/resource/cron_d.rb b/lib/chef/resource/cron_d.rb
index ba78008ab8..5dacc88fd4 100644
--- a/lib/chef/resource/cron_d.rb
+++ b/lib/chef/resource/cron_d.rb
@@ -158,6 +158,9 @@ class Chef
description: "The octal mode of the generated crontab file.",
default: "0600"
+ property :random_delay, Integer
+ description: "Start the job with a random number of minutes with the upper limit being this property."
+
# warn if someone passes the deprecated cookbook property
def after_created
raise ArgumentError, "The 'cookbook' property for the cron_d resource is no longer supported now that this resource ships in Chef itself." if new_resource.cookbook
@@ -222,6 +225,7 @@ class Chef
home: new_resource.home,
shell: new_resource.shell,
comment: new_resource.comment,
+ random_delay: new_resource.random_delay,
environment: new_resource.environment
)
action create_action