V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
hl0832
V2EX  ›  Python

请教一下大家, celery 中使用 cron 表达式是不是无法向 Java 的 Quartz 中实现指定时间触发一个间隔执行的任务,例如设置在 2019-05-01 12:10 后每 2 小时执行一个任务?

  •  1
     
  •   hl0832 · 2019-04-27 16:35:25 +08:00 · 1714 次点击
    这是一个创建于 1824 天前的主题,其中的信息可能已经有所发展或是发生改变。
    2 条回复    2019-04-28 22:52:41 +08:00
    wsgfz
        1
    wsgfz  
       2019-04-27 17:54:02 +08:00
    cron 配置成每两小时执行一次脚本

    在脚本中判断当前时间是否已经过了 2019-05-01 12:10,
    如果过了
    再执行你的任务?
    a852695
        2
    a852695  
       2019-04-28 22:52:41 +08:00
    在业务入口写一下? cron 是不能指定时间的吧
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5311 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 08:00 · PVG 16:00 · LAX 01:00 · JFK 04:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.