每当Capistrano - Cron文件更新,但没有运行

时间:2015-08-03 22:35:47

标签: ruby-on-rails cron capistrano whenever

我尝试使用Whenever和Capistrano在我的rails服务器上设置cron作业。

schedule.rb

every 1.minutes do
  p "SUCCESS in every MINUTE"
  runner "myObject.HELLO()"
end

来自本地目录$whenever --update

"SUCCESS in every MINUTE"
[write] crontab file updated
You have new mail in /var/mail/username

CapFile

 require 'whenever/capistrano'

deploy.rb

set :whenever_command, "bundle exec whenever"
require "whenever/capistrano"
set :whenever_identifier, -> {"#{fetch(:appName)}_#{fetch(:production)}"}

这有用吗?如果不是我应该改变什么,我该如何测试呢?

Capistrano 3

0 个答案:

没有答案