Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
NOTICE:
copyright_holders:
- name: 'Puppet, Inc.'
begin: 2018
62 changes: 17 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@

# scheduled_task

Welcome to your new module. A short overview of the generated parts can be found in the PDK documentation at https://docs.puppet.com/pdk/1.0/pdk_generating_modules.html#module-contents .

Below you'll find the default README template ready for some content.







#### Table of Contents

1. [Description](#description)
Expand All @@ -25,57 +14,40 @@ Below you'll find the default README template ready for some content.

## Description

Start with a one- or two-sentence summary of what the module does and/or what problem it solves. This is your 30-second elevator pitch for your module. Consider including OS/Puppet version it works with.

You can give more descriptive information in a second paragraph. This paragraph should answer the questions: "What does this module *do*?" and "Why would I use it?" If your module has a range of functionality (installation, configuration, management, etc.), this is the time to mention it.
This module adds a new [scheduled_task](https://puppet.com/docs/puppet/latest/types/scheduled_task.html) provider capable of using the more modern Version 2 Windows API for task management.

## Setup

### What scheduled_task affects **OPTIONAL**

If it's obvious what your module touches, you can skip this section. For example, folks can probably figure out that your mysql_instance module affects their MySQL instances.

If there's more that they should know about, though, this is the place to mention:

* Files, packages, services, or operations that the module will alter, impact, or execute.
* Dependencies that your module automatically installs.
* Warnings or other important notices.
### Beginning with scheduled_task

### Setup Requirements **OPTIONAL**
The scheduled_task module adapts the Puppet [scheduled_task](https://puppet.com/docs/puppet/latest/types/scheduled_task.html) resource to run using a modern API. To get started, install the module and declare 'taskscheduler_api2' as the provider, for example:

If your module requires anything extra before setting up (pluginsync enabled, another module, etc.), mention it here.
If your most recent release breaks compatibility or requires particular steps for upgrading, you might want to include an additional "Upgrading" section here.

### Beginning with scheduled_task

The very basic steps needed for a user to get the module up and running. This can include setup steps, if necessary, or it can be an example of the most basic use of the module.
~~~ puppet
scheduled_task { 'Run Notepad':
command => "notepad.exe",
...
provider => 'taskscheduler_api2'
}
~~~

## Usage

This section is where you describe how to customize, configure, and do the fancy stuff with your module here. It's especially helpful if you include usage examples and code samples for doing things with your module.
See the [Puppet resource documentation](https://puppet.com/docs/puppet/latest/types/scheduled_task.html) for more information.

## Reference

Users need a complete list of your module's classes, types, defined types providers, facts, and functions, along with the parameters for each. You can provide this list either via Puppet Strings code comments or as a complete list in the README Reference section.
### Provider

* If you are using Puppet Strings code comments, this Reference section should include Strings information so that your users know how to access your documentation.
* taskscheduler_api2: Adapts the Puppet scheduled_task resource to use the modern Version 2 API.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type has backticks, but this provider does not...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


* If you are not using Puppet Strings, include a list of all of your classes, defined types, and so on, along with their parameters. Each element in this listing should include:
### Type

* The data type, if applicable.
* A description of what the element does.
* Valid values, if the data type doesn't make it obvious.
* Default value, if any.
* scheduled_task: See the [Puppet resource documentation](https://puppet.com/docs/puppet/latest/types/scheduled_task.html) for more information.

## Limitations

This is where you list OS compatibility, version compatibility, etc. If there are Known Issues, you might want to include them under their own heading here.
* Only supported on Windows Server 2008 and above, and Windows 7 and above.

## Development

Since your module is awesome, other users will want to play with it. Let them know what the ground rules for contributing are.

## Release Notes/Contributors/Etc. **Optional**

If you aren't using changelog, put your release notes here (though you should consider using changelog). You can also add any additional sections you feel are necessary or important to include here. Please use the `## ` header.
Puppet modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad hardware, software, and deployment configurations that Puppet is intended to serve, therefore want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. For guidelines on how to contribute, see our [module contribution guide.](https://docs.puppet.com/forge/contributing.html)
9 changes: 9 additions & 0 deletions examples/create_task_v1.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
scheduled_task { 'Run Notepad':
ensure => present,
command => 'C:\Windows\System32\notepad.exe',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just what every system should do at noon every day... launch a notepad!

trigger => {
schedule => daily,
start_time => '12:00',
},
provider => 'taskscheduler_api2'
}
4 changes: 4 additions & 0 deletions examples/delete_task_v1.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
scheduled_task { 'Run Notepad':
ensure => absent,
provider => 'taskscheduler_api2'
}
Loading