Chef client service - intervals


#1

hi,

I installed the chef-client as chef client service(Window service) in windows
2008 R2 machine. The default interval time to run chef-client is 1800 secs(30
Min). I need to change the interval time as per my needs like daily twice or
weekly twice it is possible?? k means where i want to change the
configuration???

I already tried with changes in interval time in

C:\opscode\chef\embedded\lib\ruby\gems\1.9.1\gems\chef-11.12.2-x86-mingw32\lib\chef\application\windows_service.rb
file

any other place or any option for daily twice or weekly twice it is possible??

Thanks,
Ganesan.A


#2

Hi Ganesan, cookbooks are driven by attribute files. To modify the timer
make change to the default.rb attrib file located in the attribute
subfolder of the cookbook. The best way to make changes to a community
cookbook is to create a “wrapper cokbook”. That way you won’t have to fork
the existing chef-client cookbook and get stuck maintaining it.

Simply create a new cookbook. In the attribute file of your new cookbook
add a value for your attribute: default[‘chef_client’][‘interval’] =
‘234567’

In the recipe of your wrapper cookbook add: include_recipe ‘chef-client’

Cheers,
Alex-

On Mon, Apr 28, 2014 at 5:52 AM, ganesan15785@gmail.com wrote:

hi,

I installed the chef-client as chef client service(Window service) in
windows
2008 R2 machine. The default interval time to run chef-client is 1800
secs(30
Min). I need to change the interval time as per my needs like daily twice
or
weekly twice it is possible?? k means where i want to change the
configuration???

I already tried with changes in interval time in

C:\opscode\chef\embedded\lib\ruby\gems\1.9.1\gems\chef-11.12.2-x86-mingw32\lib\chef\application\windows_service.rb
file

any other place or any option for daily twice or weekly twice it is
possible??

Thanks,
Ganesan.A