GithubHelp home page GithubHelp logo

jobrunner's Introduction

Overview

Simple cron based scheduler that can be used to ensure that an external program can be run per the specified frequency

This is useful when you want to run some script at a frequency till it is successful. i.e. you want to run a daily backup, but the script is not successful everytime you run (e.g. no network). In such cases, you want to ensure that the script is able to run succesfully at least once every day and you want to keep trying till then.

For this scheme to work, you need the script to fail with a non-0 exit code if it wasnt succesful, else exit with 0 status

Usage

Job Configuration

INI based configuration as follows

[sync-mbld]
path: ~/usr/local/bin/sync-nas -mbld
frequency: daily

[sync-fd]
path: ~/usr/local/bin/sync-nas -fd
frequency: daily

Adding Cron

Add the following to cron

$ crontab -e
*/5 * * * * cd ~/work/python/jobrunner && python -m jobrunner

jobrunner's People

Watchers

Fasih 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.