【发布时间】:2013-03-30 10:40:00
【问题描述】:
我正在使用whenever gem我的 schedule.rb 内容是
每 2 分钟跑步一次 "炼油厂::Page.update_publishing_date_to_list_in_menu" 结束
我通过 crontab -l 得到这个
# Begin Whenever generated tasks for: /home/harssh/Documents/Aptana Studio 3 Workspacwinbox/wineboxnew/config/schedule.rb
0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58
* * * * /bin/bash -l -c 'cd /home/harssh/Documents/Aptana\ Studio\ 3\ Workspacwinbox/wineboxnew && RAILS_ENV=production bundle exec rake page:publish --silent'
# End Whenever generated tasks for: /home/harssh/Documents/Aptana Studio 3 Workspacwinbox/wineboxnew/config/schedule.rb
这在我的 ubuntu 10.10 上运行良好
但是我在我的 debian 服务器上得到了(CRON) error (grandchild #26321 failed with exit status 127)
我使用 Ruby 1.9.3 使用 apache 和带有 rvm 的乘客
如果我在 debian 的终端中使用脚本,它也可以正常运行,但自动 cron 任务会出错
【问题讨论】:
-
/log/cron.log 中的任何内容?
-
大声笑,它可能只是
*/2...127问题缺少命令 - 很可能是PATH问题... -
此页面的tile是日志文件Vadim的内容
-
是的 mpapis 假定 127 是路径错误我给出了所有可能的路径并设置了环境,但它总是给出 127 错误
-
我想知道是否有特定的方法来提供我可能缺少的路径
标签: ruby-on-rails cron rvm passenger