Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chartbeat-labs/puppet-cron
Puppet Module to manage Cron on Debian
https://github.com/chartbeat-labs/puppet-cron
Last synced: about 2 months ago
JSON representation
Puppet Module to manage Cron on Debian
- Host: GitHub
- URL: https://github.com/chartbeat-labs/puppet-cron
- Owner: chartbeat-labs
- License: mit
- Created: 2014-01-22T22:34:17.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2018-06-13T17:18:20.000Z (over 6 years ago)
- Last Synced: 2024-10-19T03:17:50.101Z (2 months ago)
- Language: Ruby
- Size: 36.1 KB
- Stars: 0
- Watchers: 14
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# cron
Puppet module for cron.
[![Build Status](https://travis-ci.org/chartbeat-labs/puppet-cron.png)](https://travis-ci.org/chartbeat-labs/puppet-cron)
## Example usage
Include with default parameters:
```puppet
include cron
```Include with the singleton pattern:
```puppet
class { '::cron': }
```Log both start and end of cronjobs
```puppet
class { '::cron':
extra_opts => '-L 2'
}
```### Cron Jobs
Cronjobs are placed in /etc/cron.d. If you want cronjobs to be removed
automatically when they are removed from a manifest, instead of having
to 'ensure => absent', specify purge_dot_d => true when instantiating
the cron class```puppet
class { '::cron':
purge_dot_dir => true,
}
```*Please note that this is destructive to existing unmanaged cronjobs in
/etc/cron.d! See Below.*Example cronjob
```puppet
cron::job { 'disk usage':
command => 'df -h',
minute => '0',
hour => '2',
environment => [ '[email protected]' ]
comment => "Send disk usage stats every hour"
}
```### Purging /etc/cron.d
If you enable purging of files in /etc/cron.d but you don't want puppet to
purge cronjobs installed by packages. It is enough that somewhere in your
manifest, you specify a file resource for the cronjob in question and ensure
that it's present. You don't need to specify any other parameters to the
file resource, nor do you need to manage its content.Example:
```puppet
include foo# Ensure foo's cronjob isn't purged
file { "${::cron::dot_dir}/foojob" :
ensure => 'present',
}
```## License
See [LICENSE](LICENSE) file.