On Sat, Jul 4, 2009 at 6:34 PM, Joe McDonagh <joseph.e.mcdon...@gmail.com>wrote:
> > Macno wrote: > > You can do something like this > > > > cron { > > "getBroadcast": > > command => "/server/www-production/www.server.de/cli/ > > getBroadcastFromFtp.php", > > user => root, > > weekday => 3, > > minute => $hostname ? { > > server-vm1 => "15,45", > > server-vm2 => "0,30" > > }, > > hour => ['8-20']; > > } > > > > On 2 Lug, 09:04, Rupert <linux...@googlemail.com> wrote: > > > >> Hello, > >> im trying to create a class that creates a cronjob that is run ever 15 > >> minutes on 2 Servers. > >> These jobs should run at 15 and 45 on one server and on 0 and 30 on > >> the other server. > >> When i set a variable to '0,30' puppet complains that its not a valid > >> minute. > >> Is there a different approach in puppet for this? > >> > >> Here is my class: > >> > >> class cronjobs_servers { > >> > >> case $hostname { > >> > >> "server-vm1": { > >> $cronminute="15,45" > >> $cronminute2="0" > >> } > >> "server-vm2": { > >> $cronminute="0,30" > >> $cronminute2="10" > >> > >> } > >> > >> } > >> > >> cron { > >> "generate_snapshot": > >> command => "/server/www-production/www.server.de/cli/ > >> generateSnapshot.php", > >> user => root, > >> weekday => ['1-5'], > >> minute => $cronminute2, > >> hour => 22; > >> } > >> cron { > >> "getBroadcast": > >> command => "/server/www-production/www.server.de/cli/ > >> getBroadcastFromFtp.php", > >> user => root, > >> weekday => 3, > >> minute => $cronminute, > >> hour => ['8-20']; > >> } > >> cron { > >> "notifyMissingVideo": > >> command => "/server/www-production/www.server.de/cli/ > >> notifyMissingVideo.php", > >> user => root, > >> weekday => 3, > >> minute => $cronminute, > >> hour => ['8-20']; > >> } > >> cron { > >> "cache_cleanup": > >> command => "nice -n 19 /usr/sbin/tmpwatch -a -d -q 48 / > >> server/www-production/www.server.de/cache", > >> user => root, > >> minute => 2, > >> hour => 0; > >> } > >> > >> } > >> > >> thx a lot > >> > >> .r > >> > > > > > > You can also use the '*/15' notation. I use single quotes, not sure if * > is a meta character, but better safe than sorry. > Hello, thnx for the tips, i thought I tried the array option, but I had some quotes there, without it works fine. .r > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@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 -~----------~----~----~----~------~----~------~--~---