Version information
This version is compatible with:
- Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 4.7.0 < 6.0.0
- , ,
Start using this module
Add this module to your Puppetfile:
mod 'chadh-cron', '0.1.1'
Learn more about managing modules with a PuppetfileDocumentation
cron
Table of Contents
- Description
- Setup - The basics of getting started with cron
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
Description
The cron
module provides resources for managing cron jobs in /etc/cron.d
. Beyond just creating the cron files, it also deploys a cleaner script that removes jobs that are no longer managed by puppet.
Setup
Beginning with cron
To use the cron
module, include it:
include cron
Usage
To create a new cron job, use the cron::entry
defined resource type:
This example will run mycommand
at 23 past the hour as user root.
cron::entry { 'my_job':
command => '/usr/local/bin/mycommand > /dev/null',
user => 'root',
minute => '23',
}
Reference
This module uses puppet strings for documentation.
Limitations
As long as this module is used for generating cron entries, they will be cleaned up when they are no longer managed (that is, when the resource is removed from your puppet catalog). The cleanup script works by looking at all jobs with "pup" prefix, so if you do not want the cron job to be purged, you will need to rename it.
Dependencies
- puppet (>= 4.7.0 < 6.0.0)
- puppetlabs/stdlib (>= 4.13.0)