【发布时间】:2012-01-23 22:22:48
【问题描述】:
在您阅读本文之前,请了解我对 cron 的想法完全陌生,所以这对我来说很难。我每次都捆绑安装了gem。然后我跑了
wheneverize .
没有错误。 schedule.rb 已创建。我运行时有一个名为 schedule_scrape.rb 的文件
ruby script/scheduled_scrape.rb
它工作得很好。我在我的 schedule.rb 中加入了这些行
every 1.minutes do
command "ruby script/scheduled_scrape.rb" #later on it'll be half an hour,
#i just need to test here
end
这没有任何作用。我挖了一圈,发现也许应该在终端中调用它(我想激活它?)
whenever --update-crontab store
现在,这仍然无济于事。我需要做什么才能定期调用我的 schedule_scrape.rb
【问题讨论】:
标签: ruby-on-rails ruby cron whenever