dayone80
11/30/2017 - 2:40 AM

Active Job実行

namespace :job do
  desc "クローラー"
  task crawler: :environment do
    CrawlerJob.perform_now
  end
end
# Rakeタスクの場合
$bundle exec rake job:[タスク名]
# Rails Consoleから実行する場合
$rails c
$[クラス名].perform_now