discourse/app/jobs/scheduled/create_backup.rb
Robin Ward e22f1ae186 Support for a daily job at a certain hour. Convert backup job to run at
3am instead of randomly during the day.
2014-03-14 13:02:45 -04:00

15 lines
292 B
Ruby

require_dependency "backup_restore"
module Jobs
class CreateBackup < Jobs::Scheduled
daily at: 3.hours
sidekiq_options retry: false
def execute(args)
return unless SiteSetting.backup_daily?
BackupRestore.backup!(Discourse.system_user.id, false)
end
end
end