>
> 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,".


Ok got it! I've corrected it and this is what I have now:

 cron { "apache-chown":
          command => "/bin/chown -R apache:ftpgroup /var/www",
          user    => 'root',
          hour    => 0,
          minute  => '0'
      }

  cron { "chmod-files":
          command => "/bin/find /var/www -type f -exec chmod -v 664 {} \;",
          user    => 'root',
          hour    => 0,
          minute  => '0'
      }

   cron { "chmod-directories":
          command => "/bin/find /var/www -type d -exec chmod -v 775 {} \;",
          user    => 'root',
          hour    => 0,
          minute  => '0'
      }

Thanks for your input!

Tim

On Fri, May 1, 2015 at 12:39 PM, Peter Kristolaitis <[email protected]>
wrote:

>
> 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.
>



-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

-- 
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/CAOZy0enz-zQ3TVZjCGvEDwL%2B%2B9tNKAmEFFKcgcm0RRXq8VTWZg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to