Welcome to the jaybee wiki!
※環境 = (capistrano部署 + whenever(0.97) + rake(job) )
工作定義<<<<< 使用rake,將副檔名(.rake)放置目錄(lib/tasks) example:
namespace :daily do desc "Test Crontab" task :go => [:log]
task :log => :environment do Log.create(log:"Call from Task.") end end #測試 Task bundle exec rake daily:go
排程定義<<<<< #修改 config/schedule.rb every 2.minutes do ## 每2分鐘執行一次 rake 'daily:go' end #定義的方式參考 https://github.com/javan/whenever
There was an error while loading. Please reload this page.