Python任务调度工具 py-task

码农软件 · 软件分类 · 作业/任务调度 · 2019-09-04 15:28:45

软件介绍

py-task是一个Python下的任务调度工具

  • 支持简单的周期性调度

  • 支持Cron格式的任务调度

安装方法

python setup.py install

或者

pip install py-task

示例代码:

from task import task
from task import task_container
from task.job import job
from task.trigger import cron_trigger

class MyJob(job.Job):

    def __init__(self):
        pass

    def execute(self):
        print 'Hello now is ' + str(time.time())

cron = '0-59/5 10,15,20 * * * * 2015'
new_task = task.Task('Task', MyJob(), cron_trigger.CronTrigger(cron))
container.add_task(new_task)
container.start_all()

本文地址:https://codercto.com/soft/d/13866.html

软件测试

软件测试

[美]Ron Patton / 张小松、王珏、曹跃 / 机械工业出版社 / 2006-4 / 30.00元

软件测试(原书第2版),ISBN:9787111185260,作者:(美)佩腾(Patton,R.) 著,张小松 等译;张小松译一起来看看 《软件测试》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具