Forge Home

scheduled_runonce

Run a task once during a scheduled date/time.

7,161 downloads

5,478 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.20 (latest)
  • 0.1.19
  • 0.1.18 (deleted)
  • 0.1.17
  • 0.1.15 (deleted)
  • 0.1.14 (deleted)
  • 0.1.13 (deleted)
released Mar 17th 2016
This version is compatible with:
  • , , , , , , FreeBSD

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'Ramorous-scheduled_runonce', '0.1.20'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add Ramorous-scheduled_runonce
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install Ramorous-scheduled_runonce --version 0.1.20

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

Ramorous/scheduled_runonce — version 0.1.20 Mar 17th 2016

scheduled_runonce

####Table of Contents

  1. Overview
  2. Module Description - What the run once module does and why it is useful
  3. Setup - The basics of getting started with run once
  4. License

##Overview

Allow a task to run once on a server between the provided date/time.

##Module Description

This module will allow a scheduled task to run once on a host between the date/time specified. It checks if a file exists (IE: /tmp/pp.) and if it does not, it will create and run the command.

By default the command is "/sbin/shutdown -ra now"

This module was tested and works great within RedHat Satellite 6.1.

##Setup

##Setup Requirements

Make sure touch is within the path /usr/bin or /sbin

The default command_var variable is set to "/sbin/shutdown -ra now" which will reboot your server. The intended purpose of this was originally to allow scheduled reboots, but I modified it to do more.

##Beginning with run once

    scheduled_runonce {
      "class_enabled" => true,
      "datetime_start" => "2012-06-12 12:53:00",
      "datetime_end" => "2012-06-12 12:53:59",
      "command_var" => "/sbin/shutdown -ra now",
      "check_file" => "/tmp/pp.sched_runonce",
      "task_timeout" => 0,
    }
class_enabled  (Boolean: default [true])
- Enables/Disables the process
datetime_start (String: Date Format [Y-m-d H:i:s], default [undefined])
- Start Date/Time of the reboot window
datetime_end   (String: Date Format [Y-m-d H:i:s], default [undefined])
- End Date/Time of the reboot window
command_var     (String: default [/sbin/shutdown -ra now])
- Command to execute
check_file     (String: default [/tmp/pp.scheduled-reboot])
- The check file that is created with Start DateTime added to the end.
task_timeout   (Integer: default [0])
- 0 has no timeout, X timeout in seconds

##License

Copyright 2015-2016 Eric B

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.