Issue #12630 has been reported by Josh Cooper.

----------------------------------------
Feature #12630: Add scheduled task for executing puppet periodically
https://projects.puppetlabs.com/issues/12630

Author: Josh Cooper
Status: Accepted
Priority: Normal
Assignee: Josh Cooper
Category: windows
Target version: 2.7.x
Affected Puppet version: 
Keywords: 
Branch: 


The puppet msi should create a scheduled task to execute puppet agent every 30 
minutes. The task should be configured to run as SYSTEM, which can be done 
using the /ru option:

<pre>
C:\>schtasks /create /sc minute /mo 30 /tn puppet /tr 
c:\WINDOWS\system32\calc.exe /ru SYSTEM
INFO: The schedule task "puppet" will be created under user name ("NT 
AUTHORITY\SYSTEM").
SUCCESS: The scheduled task "puppet" has successfully been created.
</pre>

In addition, the task needs to "Run with highest privileges" on Windows 
2008/Vista/Win 7. See 
<http://technet.microsoft.com/en-us/library/cc722152.aspx>. This can be 
specified using the `/rl` flag.

<pre>
C:\>schtasks /create /sc minute /mo 30 /tn puppet /tr 
c:\WINDOWS\system32\calc.exe /ru SYSTEM /rl highest
SUCCESS: The scheduled task "puppet" has successfully been created.
</pre>

The version of windows can be detected using facter 
(Facter.value(:kernelmajversion).to_f >= 6.0) See this page for information 
about major versions in windows 
<http://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx>

During uninstall we should remove the scheduled task.

<pre>
C:\>schtasks /delete /tn puppet
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to