diff --git a/lib/version.rb b/lib/version.rb index 19dd28b36..e13dfe35f 100644 --- a/lib/version.rb +++ b/lib/version.rb @@ -19,7 +19,10 @@ class Version return if (Rails.env.development? || Rails.env.test?) && ENV['FORCE_VERSION_CHECK'] != 'true' VersionCheckWorker.perform_async - # every sunday at 1:15am + return if Sidekiq::Cron::Job.find name: 'Automatic version check' + + # schedule version check every day at the current time + # this will prevent that all the instances to query the hub simultaneously m = DateTime.current.minute h = DateTime.current.hour d = DateTime.current.cwday