Class: Chef::Provider::ExecutableSchedule
- Inherits:
-
Chef::Provider
- Object
- Chef::Provider
- Chef::Provider::ExecutableSchedule
- Defined in:
- lib/chef/providers/executable_schedule_provider.rb
Overview
Executable Schedule chef provider.
Instance Method Summary collapse
-
#action_create ⇒ Object
Create cron entries if they don’t exist yet.
-
#action_delete ⇒ Object
Delete existing cron entries, do nothing if they don’t exist.
-
#load_current_resource ⇒ Object
Initialize underlying Chef cron provider with existing entries.
Instance Method Details
#action_create ⇒ Object
Create cron entries if they don’t exist yet
Return
- true
-
Always return true
49 50 51 52 53 |
# File 'lib/chef/providers/executable_schedule_provider.rb', line 49 def action_create @original_cron_provider.action_create @new_resource.updated_by_last_action(@original_cron_provider.new_resource.updated_by_last_action?) true end |
#action_delete ⇒ Object
Delete existing cron entries, do nothing if they don’t exist
Return
- true
-
Always return true
59 60 61 62 |
# File 'lib/chef/providers/executable_schedule_provider.rb', line 59 def action_delete @original_cron_provider.action_delete @new_resource.updated_by_last_action(@original_cron_provider.new_resource.updated_by_last_action?) end |
#load_current_resource ⇒ Object
Initialize underlying Chef cron provider with existing entries
Return
- true
-
Always return true
38 39 40 41 42 43 |
# File 'lib/chef/providers/executable_schedule_provider.rb', line 38 def load_current_resource @original_cron_provider = Chef::Provider::Cron.new(@new_resource.cron_resource, @run_context) @original_cron_provider.load_current_resource @current_resource = @original_cron_provider.current_resource true end |