Hi all,
I have cookbooks being executed as part of chef for every 1 hour. i need a particular cookbook to run only once in a day. is that possible ?
Thanks
Raj
Hi all,
I have cookbooks being executed as part of chef for every 1 hour. i need a particular cookbook to run only once in a day. is that possible ?
Thanks
Raj
On Windows we schedule a task to run at 5.00am every day.
windows_task 'chef-client_on_interval' do command 'C:\Chef\chef-interval-wrapper.bat' frequency :daily start_time '05:00' run_level :highest user node['build.user'].sub('.\\', '\\') password node.run_state['build_password'] action :create end
where chef-interval-wrapper.bat is:
file 'C:\Chef\chef-startup-wrapper.bat' do content <<-EOH sleep 60 cmd /c C:\\opscode\\chef\\embedded\\bin\\ruby.exe ^ C:\\opscode\\chef\\bin\\chef-client ^ -L C:\\chef\\chef-client.log ^ --force-logger ^ -c C:\\chef\\client.rb 2>> C:\\Chef\\stderror.log 1>> C:\\Chef\\stdout.log EOH action :create end
The chef run executes run list defined for the node.
We have cookbook wrapper for scheduled cookbook's run...