摘要:
import datatime import calendar def get_last_sunday(time): """ datatime ->str 返回上周的星期天 """ oneday = datetime.timedelta(days=1) if time.weekday() ==calendar.SUNDAY: #要星期几,就选星期... 阅读全文
posted @ 2018-07-25 17:26
forjie
阅读(106)
评论(0)
推荐(0)
摘要:
1,先进入项目根目录 2,导入你要执行的模块 这里就需要再次导入 from data_center(根目录)import settings 3,然后执行 阅读全文
posted @ 2018-07-25 11:18
forjie
阅读(182)
评论(0)
推荐(0)
摘要:
1、Celery加入定时任务 Celery除了可以异步执行任务之外,还可以定时执行任务。在实例代码的基础上写个测试方法: 1 #coding:utf-8 2 from celery.task.schedules import crontab 3 from celery.decorators impo 阅读全文
posted @ 2018-07-25 09:31
forjie
阅读(350)
评论(0)
推荐(0)
摘要:
1、Celery加入定时任务 Celery除了可以异步执行任务之外,还可以定时执行任务。在实例代码的基础上写个测试方法: 1 #coding:utf-8 2 from celery.task.schedules import crontab 3 from celery.decorators impo 阅读全文
posted @ 2018-07-25 09:31
forjie
阅读(13949)
评论(1)
推荐(0)

浙公网安备 33010602011771号