~yerinalexey/pcrond

Cron daemon in userspace, maintained fork of git://github.com/luca-vercelli/pcrond
58f77bb3 — Alexey Yerin 6 months ago
fix: crontabfile -> crontab
04d62b9a — Alexey Yerin 6 months ago
fix: resolve broken parts after refactor
54646fbb — Alexey Yerin 6 months ago
fix: drop weird line

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~yerinalexey/pcrond
read/write
git@git.sr.ht:~yerinalexey/pcrond

You can also use your local clone with git send-email.

This is my fork of pcrond with some small improvements and fixes to make it actually work.

#pcrond

Userspace cron daemon

A daemon similar to the standard cron daemon, however it is designed to run in userspace, not as root. Jobs scheduling use exactly the same formalism of crond.

Written in Python.

Some of the code was taken from schedule project. This project is not interested in the "human stuff" of the original project.

#Install

$ ./setup.py install --prefix=~/.local

This assumes that ~/.local/bin is in the PATH which is quite common

#Usage

$ pcrond -c path/to/my/crontab/file

It is also possible to use this library within your Python program, however this is not the intended use. For example:

from pcrond import Scheduler

scheduler = Scheduler()
scheduler.add_job("30 4 * * 0", my_python_func) # runs every sunday at 4:30
scheduler.main_loop()