better / cronner

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Easily schedule python functions to be run under cron

Build Status

Make an HTTPS GET request to google.com every minute

Create the following file and name it test.py.

import cronner
import random
try:
    from urllib.request import urlopen
except:
    from urllib import urlopen

@cronner.register('* * * * *')
def write_randint():
    urlopen('https://google.com')

cronner.main()

Run this.

$ python test.py gen-cfg | crontab -

That's it.

Installation

$ pip install cronner

About

License:MIT License


Languages

Language:Python 96.9%Language:Makefile 3.1%