# How to run the chef client periodically in Node

**URL:** <https://discourse.chef.io/t/how-to-run-the-chef-client-periodically-in-node/8588>\
**Category:** Chef Infra (archive)\
**Created:** [May 30, 2016, 11:24am UTC](https://discourse.chef.io/t/how-to-run-the-chef-client-periodically-in-node/8588 "2016-05-30T11:24:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramaduraiu](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@ramaduraiu](https://discourse.chef.io/u/ramaduraiu)\
**Post date:** [May 30, 2016, 11:24am UTC](https://discourse.chef.io/t/how-to-run-the-chef-client-periodically-in-node/8588/1 "2016-05-30T11:24:51Z")

</div>

HI Everyone,

Can anyone tell how to configure the chef client to run periodically against node.

In my case. I have a build . Once the build get updated i want to run the chef client and update into latest version . So how can we meet this .

---

<div class="post-metadata">

**Author:** ![Anil](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@Anil](https://discourse.chef.io/u/Anil)\
**Post date:** [June 21, 2016, 7:23pm UTC](https://discourse.chef.io/t/how-to-run-the-chef-client-periodically-in-node/8588/2 "2016-06-21T19:23:20Z")

</div>

you can run the chef-client in daemon mode, which has a default 30 mins delay between 2 runs and can be changed

chef-client -d -i 3600

your recipe should not take any action if build is not updated, so each chef-client run would be kind of dry and performs action only when build is updated. I believe you know more about guards e.g. only\_if, not\_if

---

<div class="post-metadata">

**Author:** ![ramaduraiu](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@ramaduraiu](https://discourse.chef.io/u/ramaduraiu)\
**Post date:** [June 23, 2016, 4:16pm UTC](https://discourse.chef.io/t/how-to-run-the-chef-client-periodically-in-node/8588/3 "2016-06-23T16:16:37Z")

</div>

Thank you Anil. It is very helpful for mr
