voxpupuli / puppet-cron

Puppet module to manage cron jobs via /etc/cron.d
https://forge.puppet.com/puppet/cron
Apache License 2.0
14 stars 40 forks source link

Compare with cron_core ? #82

Open pillarsdotnet opened 4 years ago

pillarsdotnet commented 4 years ago

I notice that cron_core is included with puppet-agent whereas this module must be explicitly loaded.

Please provide a comparison between the two modules, noting which is preferred for different use-cases.

mfuhrmann commented 3 years ago

Yeah. The differences are not clear or good to find (I didn't find anything).

alexjfisher commented 3 years ago

The cron type (now in cron_core, but formally a builtin type), manages the crontabs of users. eg. all cron resources with user => root will end up in a single crontab (/var/spool/cron/root on EL7 at least).

The type inserts some comments with warnings to not mess with the file manually.

# HEADER: This file was autogenerated at 2021-03-31 16:26:03 +0100 by puppet.
# HEADER: While it can still be managed manually, it is definitely not recommended.
# HEADER: Note particularly that the comments starting with 'Puppet Name' should
# HEADER: not be deleted, as doing so could cause duplicate cron jobs.
# Puppet Name: foo
0 2 * * 5 foo.sh
# Puppet Name: bar
* 15 1 * * bar.sh

In contrast, this module creates cron entries by creating separate files under /etc/cron.d. I think some people prefer this approach.

PRs to the docs, (maybe a rationale section??), always welcome. :)