Giter Club home page Giter Club logo

cronen's Introduction

cronen

A mini cron library for python. Able to run scheduled jobs and provide a mini-web interface for manual scheduling.

Usage example

import cronen
from datetime import timedelta

def my_func():
  print 'Hello, world!'
  
def foo():
  print 'bar'

cron = cronen.Cronen(port=12345)

# schedule a simple hello-world job every day at 20:30.
cron.add_job(
  name='hello-job',
  func=my_func,
  trigger=cronen.trigger.DailyTrigger(hour=20, minute=30)
)


# Schedule a simple foo-bar job every 10 minutes
cron.add_job(
  name='foo-bar',
  func=foo,
  trigger=cronen.trigger.PeriodicTrigger(timedelta(minutes=10))
)

cron.start()

Web interface

/status

returns a JSON indicating the current status for each job (last run time, errors)

/run/<job name>

Schedule the given job to run now.

/

A very simple HTML interface to view job status, featuring a run button for each job!

cronen's People

Contributors

barakschiller avatar

Watchers

 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.