~yerinalexey/pcrond

ref: e97d37d56b6902754318d5e0b0e2e9ca894bb35d pcrond/README.rst -rw-r--r-- 1.3 KiB
e97d37d5 — Luca Vercelli easier tox 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
python crond
============
.. image:: https://api.travis-ci.org/luca-vercelli/pcrond.svg?branch=master
        :target: https://travis-ci.org/luca-vercelli/pcrond

.. image:: https://coveralls.io/repos/luca-vercelli/pcrond/badge.svg?branch=master
        :target: https://coveralls.io/r/luca-vercelli/pcrond


Userspace cron daemon

A daemon similar to the standard `crond`, 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 https://github.com/dbader/schedule, release under MIT license.

This project is not interested in the "human stuff" of the original project.



Features 
--------
(well, mostly taken from https://github.com/dbader/schedule)

- A simple to use API for scheduling jobs.
- Very lightweight and no external dependencies.
- Excellent test coverage.
- Tested on Python 2.7, 3.5, and 3.6

Usage
-----

.. code-block:: bash

    $ ./setup.py install --prefix=~/.local
    $ pcrond path/to/my/crontab/file
    
(this assumes that ``~/.local/bin`` is in the PATH)

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

.. code-block:: python

    from pcrond import scheduler
    scheduler.add_job("30 4 * * 0", my_python_func)     #every sunday at 4:30
    scheduler.main_loop()