Git Product home page Git Product logo

rundeck_sleepyjobs's Introduction

rundeck_sleepyjobs

This script enables A Rundeck user to enable or disable a series of jobs via the API.

Instructions

  • Fill in the auth token, domain, and server URL variables in the sleepyjobs.sh file
  • Put a list of job IDs, one per line, in rdjobs.txt
  • run the script. You will be prompted, asking if you want to enable or disable the execution

How do I get an API token in Rundeck?

Log into Rundeck and click your username in the upper-right corner. Enter your profile settings. When you enter your profile settings, you will see a section that is entitled "User API Tokens." Click the + sign next to this. Fill in the expiration, roles, and user for the token.

NOTE: ACL requires toggle_schedule action for each job. If you do not have this ACL permission, stuff gets denied.

How do I know if this worked?

Once you submit by telling the script if you want to enable/stop execution, you will see the result from the server. It will contain a toggleSchedule element with two sections. One lists the successfull changes. the Other lists failures. It looks a little like this:

<toggleSchedule enabled="true" requestCount="#" allsuccessful="true/false">
    <succeeded count="1">
        <toggleScheduleResult id="[job ID]">
            <message>[message]</message>
        </toggleScheduleResult>
    </succeeded>
    <failed count="1">
        <toggleScheduleResult id="[job ID]" errorCode="[code]">
            <error>[message]</error>
        </toggleScheduleResult>
    </failed>
</toggleSchedule>

rundeck_sleepyjobs's People

Watchers

James Cloos avatar Anna K. avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.