An open API service indexing awesome lists of open source software.

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

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.yml

The 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: 2

jobs:
test1:
- echo 'Hi, this is task-scheduler'

schedule_task2:
schedule_time_unit: minutes
schedule_time_every: 2

prepare:
- pip install pyyaml

jobs:
test1:
- echo 'Hello world'