2014-03-12 13:26:51 -04:00
|
|
|
require_dependency "backup_restore"
|
|
|
|
|
|
|
|
module Jobs
|
|
|
|
class CreateBackup < Jobs::Scheduled
|
2014-03-14 13:02:21 -04:00
|
|
|
daily at: 3.hours
|
2014-03-12 13:26:51 -04:00
|
|
|
sidekiq_options retry: false
|
|
|
|
|
|
|
|
def execute(args)
|
|
|
|
return unless SiteSetting.backup_daily?
|
|
|
|
BackupRestore.backup!(Discourse.system_user.id, false)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|