https://github.com/tzutalin/task-scheduler
task-scheduler is an in-process scheduler to arrange and run the task periodically according to YAML config file
https://github.com/tzutalin/task-scheduler
Last synced: 24 days ago
JSON representation
task-scheduler is an in-process scheduler to arrange and run the task periodically according to YAML config file
- Host: GitHub
- URL: https://github.com/tzutalin/task-scheduler
- Owner: tzutalin
- License: mit
- Created: 2017-05-18T03:18:58.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-20T09:50:27.000Z (almost 8 years ago)
- Last Synced: 2024-07-04T09:46:35.207Z (11 months ago)
- Language: Python
- Size: 10.7 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
==============
task-scheduler
==============task-scheduler is an in-process scheduler to arrange and run the task periodically according to YAML config file
Inspired by `schedule `_
Usage
-----.. code-block:: bash
$ pip intall taskscheduler
$ py-task-scheduler -f [*.yml]simpleTask.yml
Ex:
$ py-task-scheduler -f simpleTask.ymlThe format of tasks.yml is as below::
task:
schedule_time_unit: [seconds/minutes/hours/day/monday/Thusday]
schedule_time_every: 1
prepare:
-
-
jobs:
:
-
:
-In the example below, we have two jobs in tasks.yml, a `prepare` job is used to install the additional package and print some messages::
task:
schedule_task1:
schedule_time_unit: seconds
schedule_time_every: 2jobs:
test1:
- echo 'Hi, this is task-scheduler'schedule_task2:
schedule_time_unit: minutes
schedule_time_every: 2prepare:
- pip install pyyamljobs:
test1:
- echo 'Hello world'