Skip to content

huangdehui2013/Lilac

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lilac

Currently, Lilac is A Distributed Scheduler Task System.

Supports

  1. Distributed scheduler, You can run many schedulers (Yes! it can on diffrent servers) at same time.
  2. Multi-threaded task execution (Leader/Follower variant)
  3. Scheduled event at a certain time or periodic execution like a crontab
  4. Attempting tasks that fail
  5. A thread-safe DB Api, and supports master/slave mode
  6. Take advantage of data-mapper pattern
  7. A Web Management Tool (Built in MVC pattern with solo and db )

image

What will be in future

  1. Add mongodb supports for scheduler task backend
  2. Improve web tool
  3. Add Loop Until event for task
  4. Add Queued task supports (Maybe zeromq or rabbitmq backend)

Requirement

The modules are required to run lilac as below:

  1. solo
  2. db

How to install

Firstly download or fetch it form github then run the command in shell:

Compatibility

Built and tested under Python 2.7

Development

Fork or download it, then run:

Setup Database

  • create database in mysql:
  • then run the mysql schema.sql script in the project directoy schema:

if your database has not been created yet, log into your mysql first using:

How to use

Set and Run Web Manager

when firstly run the web tool, please use the root account:

username

lilac

password

lilac

then login the web tool and change your root password.

Note

if you wanna use gevent, please install gevent firstly, then set use_gevent to True

Set up scheduler

Here Is A Demo :

Event

When you add job to scheduler, you see a event arugement. it is a specfic when to run task. Current event supports three types:

at

this event will only run once, in a future datetime, it should at least 1 minute speed from now: the pattern as below:

at %Y%m%d%H%M

every

this event will run in loop by minute(s), the pattern is a unsiged integer:

every minute(s)

cron

this event pattern is pattern of crontab, current supports:

field          allowed values
-----          --------------
minute         0-59
hour           0-23
day of month   1-31
month          1-12 
day of week    0-7 

and the every sub pattern only support below regex expression format:

^(\d+-\d+/\d+)|(\d+-\d+)|(\d+)$

LICENSE

Copyright (C) 2014-2015 Thomas Huang

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

About

Lilac is A Distributed Scheduler Task System.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 69.0%
  • HTML 18.4%
  • CSS 10.9%
  • JavaScript 1.7%