Hello, I tried:
cron { "app": command => "nice -n -10 /usr/bin/php/var/www/public_html/rotinas/rotinas.php 2>&1>> /var/log/app.log", environment => "PATH=$PATH", user => root, } I got the same error: "-":6: bad minute errors in crontab file, can't install. Thanks! On Mon, Apr 12, 2010 at 7:12 PM, Tony G. <tony...@gmail.com> wrote: > > On Mon, Apr 12, 2010 at 2:54 PM, Darvin Denmian <darvin.denm...@gmail.com> > wrote: >> >> Hello, >> >> even removing one double quote I got the same error: >> >> "-":6: bad minute >> errors in crontab file, can't install. >> >> Thanks! >> >> On Mon, Apr 12, 2010 at 6:49 PM, Frank Sweetser <f...@wpi.edu> wrote: >> > On 04/12/2010 05:45 PM, Darvin Denmian wrote: >> >> Hello, >> >> >> >> Why the following lines doesn't work? >> >> >> >> cron { "app" : >> >> command => ""nice -n -10 /usr/bin/php >> > >> > I'm not familiar with the cron type, but I'm betting that the pair of >> > double >> > quotes before the nice command isn't helping any =) >> > >> > -- >> > Frank Sweetser fs at wpi.edu | For every problem, there is a solution >> > that >> > WPI Senior Network Engineer | is simple, elegant, and wrong. - HL >> > Mencken >> > GPG fingerprint = 6174 1257 129E 0D21 D8D4 E8A3 8E39 29E3 E2E8 8CEC >> > >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To post to this group, send email to puppet-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> > > I don't see any time declaration, you have to define how often your cronjob > should run, it's not necessary to define '*' when you don't want to set a > particular attribute. e.g. > > If you want to run every minute you define: > > cron { "app" : > command => ""nice -n -10 /usr/bin/php > /var/www/public_html/rotinas/rotinas.php 2>&1>> /var/log/app.log", > environment => "PATH=$PATH", > user => root, > minute => "*/1" > } > > And actually you can leave the time attributes all empty. From the doc: > "All fields except the command and the user are optional, although > specifying no periodic fields would result in the command being executed > every minute." > > http://docs.puppetlabs.com/references/stable/type.html#cron > > Hope that helps > > -- > Tony > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.