Forge Home

cron

Cron Module

5,265 downloads

5,229 latest version

4.8 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.1 (latest)
  • 0.1.0 (deleted)
released Sep 8th 2018
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

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'chadh-cron', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add chadh-cron
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install chadh-cron --version 0.1.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

chadh/cron — version 0.1.1 Sep 8th 2018

cron

Table of Contents

  1. Description
  2. Setup - The basics of getting started with cron
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. 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.