This repository has been archived by the owner on Oct 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #221 from foxmask/foxmask-patch-4
Create crontab.rst
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Crontab: | ||
======== | ||
|
||
a crontab is a system that automate tasks for you, at a given moment. | ||
|
||
Here are the tasks to be used to run the **Trigger Happy** engine automatically | ||
|
||
|
||
.. code-block:: bash | ||
# trigger happy | ||
20,40 * * * * . /home/trigger-happy/bin/recycle | ||
10,25,41,55 * * * * . /home/trigger-happy/bin/read | ||
*/15 * * * * . /home/trigger-happy/bin/publish | ||
The first line is used to recycle the data, that have not been published, for example, because of reaching a rate limit. | ||
When this behavior occurs, the data stay in the cache, to be used at the next loop | ||
|
||
content of the **recycle** command | ||
|
||
.. code-block:: bash | ||
. /home/trigger-happy/bin/activate && cd /home/trigger-happy/th/ && python manage.py recycle | ||
content of the **read** command | ||
|
||
.. code-block:: bash | ||
. /home/trigger-happy/bin/activate && cd /home/trigger-happy/th/ && python manage.py read | ||
content of the **publish** command | ||
|
||
.. code-block:: bash | ||
. /home/trigger-happy/bin/activate && cd /home/trigger-happy/th/ && python manage.py publish | ||
You may notice the folder `/home/trigger-happy/th/` in each command, this is a virtualenv given for the example | ||
|
||
the periodicity of the execution, is set like this, to avoid to make 2 tasks run in same time, and also, to avoid to reach often the rate limitation of Twitter and others sensitives services |