Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status


cron (77) Versions 1.5.0

Installs cron

cookbook 'cron', '= 1.5.0', :supermarket
cookbook 'cron', '= 1.5.0'
knife supermarket install cron
knife supermarket download cron
Quality 0%

cron Cookbook

Installs the cron package and starts the crond service.


- RHEL family
- Debian family
- Solaris family
- Gentoo

Resources and Providers


The cron_d LWRP can be used to manage files in /etc/cron.d. It supports the same interface as Chef's built-in cron resource:

cron_d 'daily-usage-report' do
  minute  0
  hour    23
  command '/srv/app/scripts/daily_report'
  user    'appuser'

Note: This LWRP does not function on Solaris platforms because they do not support running jobs stored in /etc/cron.d.


  • minute, hour, day, month, weekday - schedule your cron job. These correspond exactly to their equivalents in the crontab file. All default to "*".
  • predefined_value - schedule your cron job with one of the special predefined value instead of * * * * * pattern. This correspond to @reboot, @yearly, @annually, @monthly, @weekly, @daily, @midnight or @hourly.
  • command - the command to run. Required.
  • user - the user to run as. Defaults to "root".
  • mailto, path, home, shell - set the corresponding environment variables in the cron.d file. No default.



The cron_manage definition can be used to manage the /etc/cron.allow and /etc/cron.deny files.

Incude this cookbook as dependency to your cookbook and execute the definition as:

The following will add the user mike to the /etc/cron.allow file:

cron_manage 'mike' do
  user   'mike'
  action :allow

The following will add the user john to the /etc/cron.deny file:

cron_manage 'john' do
  user  'john'  #optional, resource name will be used if not specified.
  action :deny  #optional, deny is the default


  • user - username that you want to control (optional).
  • action - :allow or :deny. :deny is the default.

License & Authors

Copyright 2010-2012, Opscode, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

L7-mysql Applicable Versions
L7-redis Applicable Versions
aide Applicable Versions
alphard-cron Applicable Versions
auto-patch Applicable Versions
autopatch_ii Applicable Versions
backup Applicable Versions
backup_lwrp Applicable Versions
bamboo Applicable Versions
boxbilling Applicable Versions
cacti Applicable Versions
certbot Applicable Versions
chef-client Applicable Versions
chef-client 2.1.8
chef-client 2.1.10
chef-client 2.2.0
chef-client 2.2.2
chef-client 2.2.4
chef-client 3.0.0
chef-client 3.0.2
chef-client 3.0.4
chef-client 3.0.6
chef-client 3.1.0
chef-client 3.1.2
chef-client 3.2.0
chef-client 3.2.2
chef-client 3.3.0
chef-client 3.3.2
chef-client 3.3.3
chef-client 3.3.4
chef-client 3.3.6
chef-client 3.3.8
chef-client 3.4.0
chef-client 3.5.0
chef-client 3.5.2
chef-client 3.6.0
chef-client 3.7.0
chef-client 3.8.0
chef-client 3.8.1
chef-client 3.8.2
chef-client 3.9.0
chef-client 4.0.0
chef-client 4.1.0
chef-client 4.1.1
chef-client 4.2.0
chef-client 4.2.1
chef-client 4.2.2
chef-client 4.2.3
chef-client 4.2.4
chef-client 4.3.0
chef-client 4.3.1
chef-client 4.3.2
chef-client 4.3.3
chef-client 4.4.0
chef-client 4.5.0
chef-client 4.5.1
chef-client 4.5.2
chef-client 4.5.3
chef-client 4.5.4
chef-client 4.6.0
chef-client 5.0.0
chef-client 6.0.0
chef-client 7.0.0
chef-client 7.0.1
chef-client 7.0.2
chef-client 7.0.3
chef-client 7.1.0
chef-client 7.2.0
chef-client 7.2.1
chef-client 8.0.0
chef-client 8.0.1
chef-client 8.0.2
chef-client 8.1.0
chef-client 8.1.1
chef-client 8.1.2
chef-client 8.1.3
chef-client 8.1.4
chef-client 8.1.5
chef-client 8.1.6
chef-client 8.1.7
chef-client 8.1.8
chef-client 9.0.0
chef-client 9.0.1
chef-client 9.0.2
chef-client 9.0.3
chef-client 9.0.4
chef-client 9.0.5
chef-client 10.0.0
chef-client 10.0.1
chef-client 10.0.2
chef-client 10.0.3
chef-client 10.0.4
chef-client 10.0.5
chef-client 10.1.0
chef-client 10.1.2
chef-client 11.0.0
chef-client 11.0.1
chef-client 11.0.2
chef-client 11.0.3
chef-client 11.0.4
chef-client 11.0.5
chef-client 11.1.0
chef-client 11.1.1
chef-client 11.1.2
chef-client 11.1.3
chef-client 11.2.0
chef-client 11.3.0
chef-client 11.3.1
chef-client 11.3.2
chef-client 11.3.3
chef-client 11.3.4
chef-client 11.3.5
chef-client 11.3.6
chef-client 11.4.0
chef-client 11.5.0
chef-client 12.0.0
chef-client 12.0.1
chef-client 12.1.0
chef-client 12.2.0
chef-client 12.3.0
chef-client 12.3.1
chef-client 12.3.2
chef-client 12.3.3
chef-client 12.3.4
chef-server-backup Applicable Versions
chef-server-with-letsencrypt Applicable Versions
clamav Applicable Versions
cloudwatch_monitoring Applicable Versions
common_linux Applicable Versions
cronapt Applicable Versions
cronner Applicable Versions
ddnsupdate Applicable Versions
elasticsearch-curator Applicable Versions
elkstack Applicable Versions
etckeeper Applicable Versions
factorio Applicable Versions
faraday Applicable Versions
github-enterprise Applicable Versions
gmvault Applicable Versions
lemur Applicable Versions
linux_patching Applicable Versions
magento-ng Applicable Versions
magentostack Applicable Versions
mediawiki_backup Applicable Versions
minecraft-basic Applicable Versions
ntp_cluster Applicable Versions
ntpdate Applicable Versions
owncloud Applicable Versions
pgbarman Applicable Versions
postgresql_lwrp Applicable Versions
rage4dns Applicable Versions
rsyslog Applicable Versions
singularity Applicable Versions
stash Applicable Versions
subliminal Applicable Versions
system Applicable Versions
thumbor_ng Applicable Versions
zfs_linux Applicable Versions

v1.5.0 (2014-09-15)

  • [#25] Fixes NameError exception on :delete
  • [#33] Updates README
  • [#40] Fixes local test-kitchen config
  • [#20] Implements a comment for cron_d provider

v1.4.3 (2014-09-09)

  • [#46] Fixes a broken case statement causing cron_d to fail

v1.4.2 (2014-09-08)

31 - Fix up validate_month for Fixnums

32 - Fix upvalidate_dow for Fixnums

v1.4.0 (2014-05-07)

  • [COOK-4628] Adding cron_manage to allow or deny users

v1.3.12 (2014-04-23)

  • [COOK-4550] - cron_d resource sometimes does not print the time in the cron output
  • PR #23 fix validate month and dow
  • Updating test harness, adding specs

v1.3.10 (2014-04-10)

  • [COOK-4507] - restore ability to use @ fields

v1.3.8 (2014-04-10)

  • [COOK-4544] fixing NameError exception on :delete action

v1.3.6 (2014-04-09)

  • [COOK-4337] fixing validations

v1.3.4 (2014-04-09)

  • Reverting [COOK-4337] - cron cookbook does no input validation

v1.3.2 (2014-03-27)

  • [COOK-4337] - cron cookbook does no input validation
  • [COOK-4229] - Support the Gentoo package

v1.3.0 (2014-02-25)

New Feature


  • COOK-3813 - Add metadata for recipes in the cron cookbook



  • COOK-3452 - Add support for raspbian platform




  • [COOK-3058]: simplify conditionals in cron recipe


  • [COOK1829] - cron_d LWRPtemplate should imply cron cookbook by default


  • [COOK-938] - don't default to upgrading cron and fix rhel6 package name
  • [COOK-1622] - add LWRP for cron.d files


  • [COOK-1514] - Cron cookbook manages wrong service name on SuSE


  • [COOK-1124] - add RHEL platform support

Foodcritic Metric

1.5.0 failed this metric

FC015: Consider converting definition to a LWRP: /tmp/cook/dbcf2501d4dd13b980697529/cron/definitions/manage.rb:1