FEATURE: Add scheduled job to ensure s3 uploads existence

FEATURE: Add scheduled job to ensure s3 uploads existence

diff --git a/app/jobs/scheduled/ensure_s3_uploads_existence.rb b/app/jobs/scheduled/ensure_s3_uploads_existence.rb
new file mode 100644
index 0000000..df29c38
--- /dev/null
+++ b/app/jobs/scheduled/ensure_s3_uploads_existence.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+module Jobs
+
+  class EnsureS3UploadsExistence < Jobs::Scheduled
+    every 1.day
+
+    def execute(args)
+      return unless SiteSetting.enable_s3_inventory
+      Discourse.store.list_missing_uploads(skip_optimized: true)
+    end
+  end
+end

GitHub sha: 44e87372