mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-11 08:11:15 -05:00
13 lines
258 B
Ruby
13 lines
258 B
Ruby
|
|
||
|
module Jobs
|
||
|
class ScheduleBackup < Jobs::Scheduled
|
||
|
daily at: 3.hours
|
||
|
sidekiq_options retry: false
|
||
|
|
||
|
def execute(args)
|
||
|
return unless SiteSetting.backup_daily?
|
||
|
Jobs.enqueue_in(rand(10.minutes), :create_daily_backup)
|
||
|
end
|
||
|
end
|
||
|
end
|