Resource Type: cron
- Defined in:
- lib/puppet/type/cron.rb
- Providers:
-
crontab
Summary
Installs and manages cron jobs.Overview
Every cron resource created by Puppet requires a command and at least one periodic attribute (hour, minute, month, monthday, weekday, or special). While the name of the cron job is not part of the actual job, the name is stored in a comment beginning with ‘# Puppet Name: `. These comments are used to match crontab entries created by Puppet with cron resources.
If an existing crontab entry happens to match the scheduling and command of a cron resource that has never been synced, Puppet defers to the existing crontab entry and does not create a new entry tagged with the ‘# Puppet Name: ` comment.
Important: _The Cron type will not reset parameters that are removed from a manifest_. For example, removing a ‘minute => 10` parameter will not reset the minute component of the associated cronjob to `*`. These changes must be expressed by setting the parameter to `minute => absent` because Puppet only manages parameters that are out of sync with manifest entries.
Autorequires: If Puppet is managing the user account specified by the ‘user` property of a cron resource, then the cron resource will autorequire that user.