cookbook 'cron', '= 1.4.3', :supermarket
cookbook 'cron', '= 1.4.3'
knife supermarket install cron
knife supermarket download cron
Installs the cron package and starts the crond service.
Platforms: - RHEL family - Debian family - Solaris family - Gentoo
Resources and Providers
cron_d LWRP can be used to manage files in
/etc/cron.d. It supports the same interface as Chef's built-in
cron_d 'daily-usage-report' do minute 0 hour 23 command '/srv/app/scripts/daily_report' user 'appuser' end
Note: This LWRP does not function on Solaris platforms because they do not support running jobs stored in /etc/cron.d.
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".
shell- set the corresponding environment variables in the cron.d file. No default.
cron_control definition can be used to manage the
Incude this cookbook as dependency to your cookbook and execute the definition as:
The following will add the user mike to the
cron_manage 'mike' do user 'mike' action :allow end
The following will add the user john to the
cron_manage 'john' do user 'john' #optional, resource name will be used if not specified. action :deny #optional, deny is the default end
user- username that you want to control (optional).
:deny. :deny is the default.
License & Authors
- Author:: Joshua Timberman (firstname.lastname@example.org)
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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
This cookbook has no specified dependencies.
- [#46] Fixes a broken case statement causing cron_d to fail
31 - Fix up validate_month for Fixnums
32 - Fix upvalidate_dow for Fixnums
- [COOK-4628] Adding cron_manage to allow or deny users
- [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
- [COOK-4507] - restore ability to use @ fields
- [COOK-4544] fixing NameError exception on :delete action
- [COOK-4337] fixing validations
- Reverting [COOK-4337] - cron cookbook does no input validation
- [COOK-4337] - cron cookbook does no input validation
- [COOK-4229] - Support the Gentoo package
- COOK-4112 - Solaris 11 support for cron
- COOK-3813 - Add metadata for recipes in the cron cookbook
- COOK-3452 - Add support for raspbian platform
- COOK-3005 - Remove blankline in template
- [COOK-3058]: simplify conditionals in cron recipe
- [COOK1829] -
cron_dLWRPtemplate 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
1.4.3 failed this metric
FC015: Consider converting definition to a LWRP: /tmp/cook/a2d3ac1ea32f24d33238049e/cron/definitions/manage.rb:1
1.4.3 failed this metric