On Mon, Nov 5, 2012 at 4:23 AM, Alexander Holte-Davidsen <alexander.david...@gmail.com> wrote: > Hi all, > > I have a application that I schedule via cron. This is a application that > runs once a week, either on Tuesday or Thursday. The scheduling is now done > via Puppet. > > I now see that I need to redefine this, on some nodes the application should > for example only run the 3. Tuesday each month, not each Tuesday. > I want to do the scheduling using puppet and parameterized classes. For > example I want to be able to define: > > foo {'Tuesday': > week => '3', > hour => '18', > minute => '00', > } > > This should generate a cron job ( that changes every month). For November it > should look like this: > 00 18 20 11 * /usr/bin/foo > > Next month the crontab entry should be changed to: > 00 18 18 20 * /usr/bin/foo
Hmmm. Should that be: 00 18 18 12 * ? 20 is an invalid month. > Has anyone done anything similar and are willing to give me some input on > how to solve this? Instead of using the wildcard ('*') month, could you (simply) specify the months? 0 18 20 1 * 0 18 18 2 * 0 18 20 3 * 0 18 18 4 * 0 18 20 5 * 0 18 18 6 * 0 18 20 7 * 0 18 18 8 * 0 18 20 9 * 0 18 18 10 * 0 18 20 11 * 0 18 18 12 * -mz -- 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.