Puppet Windows: scheduled_task : TypeError

153 views
Skip to first unread message

Mohamed Lrhazi

unread,
Nov 23, 2011, 4:02:36 PM11/23/11
to puppet...@googlegroups.com
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.

Jacob Helwig

unread,
Nov 23, 2011, 5:28:39 PM11/23/11
to puppet...@googlegroups.com

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

signature.asc

Mohamed Lrhazi

unread,
Nov 23, 2011, 6:53:41 PM11/23/11
to puppet...@googlegroups.com
Thanks Jacob....Did that answer my TypeError as well?

Mohamed.

Jacob Helwig

unread,
Nov 23, 2011, 8:29:34 PM11/23/11
to puppet...@googlegroups.com
On 2011-11-23 15:53 , Mohamed Lrhazi wrote:
> Thanks Jacob....Did that answer my TypeError as well?

No, a stack trace would help for that.

>

signature.asc

Josh Cooper

unread,
Jun 21, 2012, 12:53:40 PM6/21/12
to puppet...@googlegroups.com
Hi Greg,

I believe this is issue https://projects.puppetlabs.com/issues/13008, which I have fixed in my topic branch and is awaiting to be merged into 2.7.x. It would be great if you could try it out and let me know how it goes.

Josh

On Thu, Jun 21, 2012 at 9:00 AM, Greg Swift <greg...@gmail.com> wrote:
Mohamed,

Did you get anywhere with this?  I'm running into the exact same issue.

-greg
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/cIrGZR2XNjYJ.

To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.



--
Josh Cooper
Developer, Puppet Labs

Greg Swift

unread,
Jun 21, 2012, 1:46:08 PM6/21/12
to puppet...@googlegroups.com
I believe you are correct.  I removed the arguments key/value pair and it ran fine.  I'm patching in your changes to try it with the arguments option.

thank you very much


On Thursday, June 21, 2012 11:53:40 AM UTC-5, Josh Cooper wrote:
Hi Greg,

I believe this is issue https://projects.puppetlabs.com/issues/13008, which I have fixed in my topic branch and is awaiting to be merged into 2.7.x. It would be great if you could try it out and let me know how it goes.

Josh

To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Greg Swift

unread,
Jun 21, 2012, 1:57:17 PM6/21/12
to puppet...@googlegroups.com
So.. now I'm getting your error instead of mine.

Josh Cooper

unread,
Jun 21, 2012, 2:15:09 PM6/21/12
to puppet...@googlegroups.com, puppet...@googlegroups.com
Can you try running with --trace and --debug, and adding the stack trace to the ticket?
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/CG9Sa5hf2jYJ.

To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.

Greg Swift

unread,
Jun 21, 2012, 4:02:38 PM6/21/12
to puppet...@googlegroups.com
first thing in the morning.


On Thursday, June 21, 2012 1:15:09 PM UTC-5, Josh Cooper wrote:
Can you try running with --trace and --debug, and adding the stack trace to the ticket?

Greg Swift

unread,
Jun 22, 2012, 3:20:46 PM6/22/12
to puppet...@googlegroups.com
attached to the ticket.  I won't be able to work on this for about a week though.. other priority just came up.  But let me know and when I can get back on it I will.

Josh Cooper

unread,
Jun 22, 2012, 3:23:31 PM6/22/12
to puppet...@googlegroups.com
Thanks Greg. Can you attach the manifest you are using (with the
arguments) to the ticket?
>>>>>> puppet-users...@googlegroups.com.
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/puppet-users?hl=en.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Josh Cooper
>>>>> Developer, Puppet Labs
>>>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Puppet Users" group.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msg/puppet-users/-/CG9Sa5hf2jYJ.
>>> To post to this group, send email to puppet...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> puppet-users...@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 view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/Gs01u9mrFhEJ.
>
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.

Greg Swift

unread,
Jul 5, 2012, 10:08:39 AM7/5/12
to puppet...@googlegroups.com
the manifest is now attached to the ticket


On Friday, June 22, 2012 2:23:31 PM UTC-5, Josh Cooper wrote:
Thanks Greg. Can you attach the manifest you are using (with the
arguments) to the ticket?

>>>>>> puppet-users+unsubscribe@googlegroups.com.
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/puppet-users?hl=en.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Josh Cooper
>>>>> Developer, Puppet Labs
>>>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Puppet Users" group.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msg/puppet-users/-/CG9Sa5hf2jYJ.
>>> To post to this group, send email to puppet...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> puppet-users+unsubscribe@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 view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/Gs01u9mrFhEJ.
>
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages