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

Support for Managing Anacron #129

Open jplindquist opened 7 months ago

jplindquist commented 7 months ago

Affected Puppet, Ruby, OS and module versions/distributions

Would it be possible (or accepted even) to add support for managing /etc/anacrontab on RHEL based systems if we'd like to be able to set things there?

/etc/anacrontab and according to https://man7.org/linux/man-pages/man5/anacrontab.5.html

# /etc/anacrontab: configuration file for anacron

# See anacron(8) and anacrontab(5) for details.

SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# the maximal random delay added to the base delay of the jobs
RANDOM_DELAY=45
# the jobs will be started during the following hours only
START_HOURS_RANGE=3-22

#period in days   delay in minutes   job-identifier   command
1   5   cron.daily      nice run-parts /etc/cron.daily
7   25  cron.weekly     nice run-parts /etc/cron.weekly
@monthly 45 cron.monthly        nice run-parts /etc/cron.monthly

I'm happy to make an attempt at adding this type of support if it would be accepted.

kenyon commented 7 months ago

Likely possible, but may I suggest, as an alternative approach, using our systemd module to manage systemd timer and service units, which I think has all of the capabilities of anacron, and other benefits.