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

RSS

alphard-cron (3) Versions 1.0.2

Installs/Configures and Provides helpers definitions for cron

Policyfile
Berkshelf
Knife
cookbook 'alphard-cron', '~> 1.0.2', :supermarket
cookbook 'alphard-cron', '~> 1.0.2'
knife supermarket install alphard-cron
knife supermarket download alphard-cron
README
Dependencies
Quality 17%

alphard-cron Cookbook

This cookbook provides a recipe to update cron and schedule service restart

Requirements

  • Ubuntu 14.04

Chef

  • Chef 12.0 or later

Attributes

alphard-cron::default

General

  • ['alphard']['cron]['user'] - the user used to add crontab entries and create log file and directory
  • ['alphard']['cron]['group'] - the user used create log file and directory
  • ['alphard']['cron]['version'] - the cron ubuntu version

Cron Tab

  • ['alphard']['cron]['tab'][my_service] - the service name you want to restart periodically (the restart command will be: 'service my_service restart')
  • ['alphard']['cron]['tab'][my_service][expression] - the cron expression
  • ['alphard']['cron]['tab'][my_service][minute] - the cron expression minute value
  • ['alphard']['cron]['tab'][my_service][hour] - the cron expression hour value
  • ['alphard']['cron]['tab'][my_service][weekday] - the cron expression weekday value
  • ['alphard']['cron]['tab'][my_service][day] - the cron expression day value
  • ['alphard']['cron]['tab'][my_service][month] - the cron expression month value
  • ['alphard']['cron]['tab'][my_service][randomized] - default false, if true the service will be restart with the specified delay. Useful fo distributed env and you don't want to restart services at the same time on each machine
  • ['alphard']['cron]['tab'][my_service][delay] - the cron maximum delay before restart in seconds
  • ['alphard']['cron]['tab'][my_service][enabled] - if true the cron entry will be added to the cron tab, if false the entry will be removed from cron tab

Usage

alphard-cron::default

Include alphard-cron in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[alphard-cron]"
  ]
}

Add attributes for each service you want to restart periodically

default['alphard']['cron']['tab']['cron']['expression'] = '* * * * *'
default['alphard']['cron']['tab']['cron']['randomized'] = true
default['alphard']['cron']['tab']['cron']['delay'] = 60
default['alphard']['cron']['tab']['cron']['enabled'] = true

License

Copyright 2009-2016, Hydra Technologies, 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.

Authors

Dependent cookbooks

cron >= 1.7.6

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

1.0.2 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

1.0.2 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

1.0.2 failed this metric

FC066: Ensure chef_version is set in metadata: alphard-cron/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

1.0.2 passed this metric

Testing File Metric
            

1.0.2 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

1.0.2 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number