# Execute cookbook/recipe on multiple nodes

**URL:** <https://discourse.chef.io/t/execute-cookbook-recipe-on-multiple-nodes/16613>\
**Category:** Chef Infra (archive)\
**Created:** [February 1, 2020, 3:46pm UTC](https://discourse.chef.io/t/execute-cookbook-recipe-on-multiple-nodes/16613 "2020-02-01T15:46:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prashi89](https://avatars.discourse-cdn.com/v4/letter/p/8c91f0/32.png) [@prashi89](https://discourse.chef.io/u/prashi89)\
**Post date:** [February 1, 2020, 3:46pm UTC](https://discourse.chef.io/t/execute-cookbook-recipe-on-multiple-nodes/16613/1 "2020-02-01T15:46:27Z")

</div>

how can i execute one cookbook/recipe to multiple nodes, what is the command i can use ?

---

<div class="post-metadata">

**Author:** ![karlamrhein](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/karlamrhein/32/1770_2.png) [@karlamrhein](https://discourse.chef.io/u/karlamrhein)\
**Post date:** [February 1, 2020, 6:21pm UTC](https://discourse.chef.io/t/execute-cookbook-recipe-on-multiple-nodes/16613/2 "2020-02-01T18:21:13Z")

</div>

Two methods:

1)Set up chef client to run on multiple nodes via cron. I use the chef-client cookbook to configure this automatically.

[https://supermarket.chef.io/cookbooks/chef-client](https://supermarket.chef.io/cookbooks/chef-client)

1. Ad-hoc cookbook runs on multiple nodes can be done with chef-run

[https://www.chef.sh/docs/chef-workstation/chef-run-users-guide/](https://www.chef.sh/docs/chef-workstation/chef-run-users-guide/)

---

<div class="post-metadata">

**Author:** ![prashi89](https://avatars.discourse-cdn.com/v4/letter/p/8c91f0/32.png) [@prashi89](https://discourse.chef.io/u/prashi89)\
**Post date:** [February 9, 2020, 2:40am UTC](https://discourse.chef.io/t/execute-cookbook-recipe-on-multiple-nodes/16613/3 "2020-02-09T02:40:02Z")

</div>

Thanks Karla
