Code Monkey home page Code Monkey logo

cronwrap's Introduction

Overview

This is a wrapper for cron jobs which implements common housekeeping tasks.

  • Jitter
  • Overlap protection
  • Timeout
  • Failure suppression
  • Priority

Jitter

If enabled cronwrap will delay for a random amount of time up to a specified maximum before starting the job. This is useful for jobs that run on many machines but access a centralized service. The random number generator is seeded with the hostname of the machine so that the job runs at a consistent time on each machine.

Overlap Protection

If enabled cronwrap will not start multiple simultaneous copies of job. For example, you have a job that runs once an hour and usually completes in a minute. However, there's a chance it will get stuck and take more than an hour or even hang forever. You might not want cron to start another copy of the job while the previous job is still running.

Timeout

If enabled cronwrap will terminate the process if it runs longer than the specified timeout. A SIGTERM will be sent to the job followed by a SIGKILL after 5 seconds.

Priority

Set process priority, a la the utility nice

Failure Suppression

If enabled cronwrap will suppress non-zero exit values and output unless the job exceeds the specified number of consecutive failures. This is useful for jobs that might fail occasionally due to extenuating circumstances but for which the occasional failure is not a big deal as long as it the job starts running successfully again soon.

Downloads

Tarballs available from the tags page.

cronwrap's People

Contributors

jheiss avatar

Stargazers

 avatar

Watchers

Omer Hasan avatar James Cloos 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.