schedule.rb 458 B

123456789101112131415
  1. #!/usr/bin/env ruby
  2. # This process is used to maintain Huginn's upkeep behavior, automatically running scheduled Agents and
  3. # periodically propagating and expiring Events. It's typically run via foreman and the included Procfile.
  4. unless defined?(Rails)
  5. puts
  6. puts "Please run me with rails runner, for example:"
  7. puts " RAILS_ENV=production bundle exec rails runner bin/schedule.rb"
  8. puts
  9. exit 1
  10. end
  11. scheduler = HuginnScheduler.new
  12. scheduler.run!