~yerinalexey/pcrond

09f14076d6d23f741d026289ed6933f4e97fe4b0 — Alexey Yerin 5 months ago 6a0a6eb
chore: rewrite README in markdown
2 files changed, 40 insertions(+), 57 deletions(-)

A README.md
D README.rst
A README.md => README.md +40 -0
@@ 0,0 1,40 @@
This is my fork of [pcrond](https://github.com/luca-vercelli/pcrond) with some
small improvements and fixes to make it actually work.

# pcrond
Userspace cron daemon

A daemon similar to the standard [`cron` daemon][1], 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][2].
This project is not interested in the "human stuff" of the original project.

# Install
```sh
$ ./setup.py install --prefix=~/.local
```

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

# Usage
```sh
$ 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:

```python
from pcrond import Scheduler

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

[1]: https://en.wikipedia.org/wiki/Cron
[2]: https://github.com/dbader/schedule


D README.rst => README.rst +0 -57
@@ 1,57 0,0 @@
python crond
============

Userspace cron daemon

A daemon similar to the standard ``cron`` daemon [1], 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 [2].
This project is not interested in the "human stuff" of the original project.


Features
--------
(well, mostly taken from [2])

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

Install
-----

.. code-block:: bash

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

(this assumes that ``~/.local/bin`` is in the PATH, that is quite common)

Usage
-----

.. code-block:: bash

    $ pcrond.py -r 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:

.. code-block:: python

    from pcrond import Scheduler

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


Links
-----
[1] https://en.wikipedia.org/wiki/Cron

[2] https://github.com/dbader/schedule