cron

pdk
Cron Module

Chad Huneycutt

chadh

4,051 downloads

4,026 latest version

4.8 quality score

Version information

  • 0.1.1 (latest)
  • 0.1.0
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
  • CentOS
    ,
    Solaris
    ,
    FreeBSD

Start using this module

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.