【发布时间】:2014-12-17 16:33:11
【问题描述】:
我最近设置了调度程序插件并设置了我的 rake 任务“rake cron_jobs:my_task”。
当我用 'heroku run rake cron_jobs:my_task',它工作正常。
调度程序还声称它在它应该运行的时候运行,并计划再次运行,但是没有像https://devcenter.heroku.com/articles/scheduler#inspecting-output 所说的那样与进程关联的日志记录。
'heroku ps' 显示没有预定的测功机,'heroku logs --ps scheduler.1' 没有输出。
我错过了什么?
【问题讨论】:
-
尝试只运行不带 '.1' 的 heroku logs --ps 调度程序,看看是否有任何输出。
-
就我而言,我需要将应用程序名称添加到日志命令中:
heroku logs --ps scheduler.1 -a myapp。不幸的是,一旦调度器测功机完成执行任务,它就会减速,我认为没有办法检查它的输出。
标签: ruby-on-rails heroku scheduler