On 2011-11-23 13:02 , Mohamed Lrhazi wrote:
> am trying this:
> 
>     scheduled_task { 'Puppet Run':
>         ensure    => present,
>         enabled   => true,
>         command   => 'C:\\ruby187\\bin\\puppet.bat',
>         arguments => 'agent --verbose --logdest C:\\Temp\puppet.log',
>         trigger   => {
>             schedule   => daily,
>             #every      => 2             # Defaults to 1
>             #start_date => '2011-08-31', # Defaults to 'today'
>             start_time => '16:00',      # Must be specified
>         }
>     }
> 
> And getting this error:
> 
> err: /Stage[main]/Gu_splunk/Scheduled_task[Puppet Run]/ensure: change
> from absent to present failed: Could not set 'present on ensure:
> TypeError at /etc/puppet/
> environments/windows/modules/gu_splunk/manifests/init.pp:84
> 
> Another question I have is how do I schedule for every 30 minutes? or
> every one hour?
> 
> Thanks a lot,
> Mohamed.
> 

Since the scheduled_task type uses the v1 Windows API, being able to set
repetitions at resolutions more fine grained than the daily level isn't
possible, without creating multiple triggers to create the within a day
repetition manually.

If you know of a good Ruby interface to the newer Task Scheduler APIs,
which support this, then it would be possible for someone to write
another provider that supported this.

-- 
Jacob Helwig
http://about.me/jhelwig

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to