Skip to content

Instantly share code, notes, and snippets.

@pburkholder
Created July 22, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pburkholder/6a4a119635aa612528b0 to your computer and use it in GitHub Desktop.
Save pburkholder/6a4a119635aa612528b0 to your computer and use it in GitHub Desktop.
Windows ChefClient Task v. Service

Chef Client as a scheduled task is generally preferable to a service, as it provides better visibility, more configurability, and fewer issues around log rotation and permissions. The windows cookbook has support for scheduled tasks.

In more detail:

  • chef-client as a Windows Service has issues with log rotation, which can lead to filling a disk partition. The scheduled task does not have that problem
  • status of chef-client as a Windows Service can be indeterminate. The "running" status might indicate only the watcher is working, not the entire chef-client service
  • chef-client as a Windows Service can have issues with insufficient permissions depending on the service context. Scheduled task is less likely to have such issues

When using chef-client as a scheduled task it's important to stagger the task execution times across your clients to avoid regularlly overloading your Chef Server. Support for adding a random delay will available in a future release of the Windows Cookbook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment