谢谢回复 我的脚本内容是: ENV['RAILS_ENV'] = ARGV.first || ENV['RAILS_ENV'] || 'production' require File.expand_path(File.dirname(__FILE__) + "/../config/environment") require 'rails' require 'rubygems' loop do Rails.logger.info "== job job, sleep 30 seconds..." puts 'hello', '~' * 50 Test.create(val: 'test') sleep 30 end 比如这种,如果在ssh console里面执行ruby hello.rb,每30秒去往Test增加数据,如果console超时了断开了,会中断吗? sidekiq-cron的话我之后改下,我把任务方法定义好,设置执行时间为30秒,然后直接用fly.io来部署(fly deploy --remote-only)就可以了嘛?
谢谢回复
我的脚本内容是:
比如这种,如果在ssh console里面执行
ruby hello.rb
,每30秒去往Test增加数据,如果console超时了断开了,会中断吗?sidekiq-cron的话我之后改下,我把任务方法定义好,设置执行时间为30秒,然后直接用fly.io来部署(fly deploy --remote-only)就可以了嘛?