On 05/01/2015 12:31 PM, Tim Dunphy wrote:
That produces the following crons in my crontab:
# Puppet Name: chmod-files
* 0 * * * /bin/find /var/www -type f -exec chmod -v 664 {} \;
# Puppet Name: apache-chown
* 0 * * * /bin/chown -R apache:ftpgroup /var/www
# Puppet Name: chmod-directories
* 0 * * * /bin/find /var/www -type d -exec chmod -v 775 {} \;
If I read my cron correctly that should run only once every midnight.
So two questions: am I reading this cron correctly ? That it is
supposed to run once a day at midnight?
This isn't really a Puppet problem, but regardless:
Those cron entries are for "every minute during the zeroth hour". So at
00:00 it will run, then at 00:01, then 00:02, and so on all the way to
00:59, then will stop until 00:00 the next day. Therefore, if the
chmod/chown processes take more than 1 minute to run, they will stack up
during that period of time.
The entry you want is "0 0 * * *" -- that will run exactly once, at
00:00 each day. In your manifest, you can express this with "hour => 0,
minute => 0,".
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/5543AC42.6020407%40alter3d.ca.
For more options, visit https://groups.google.com/d/optout.