diff --git a/apps/files/appinfo/info.xml b/apps/files/appinfo/info.xml
index d8c61d0f456..67c589ed755 100644
--- a/apps/files/appinfo/info.xml
+++ b/apps/files/appinfo/info.xml
@@ -26,6 +26,7 @@
OCA\Files\BackgroundJob\ScanFiles
OCA\Files\BackgroundJob\DeleteOrphanedItems
OCA\Files\BackgroundJob\CleanupFileLocks
+ OCA\Files\BackgroundJob\CleanupDirectEditingTokens
diff --git a/apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php b/apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php
new file mode 100644
index 00000000000..77907fab281
--- /dev/null
+++ b/apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php
@@ -0,0 +1,31 @@
+interval = self::INTERVAL_MINUTES;
+ $this->manager = $manager;
+ }
+
+ /**
+ * Makes the background job do its work
+ *
+ * @param array $argument unused argument
+ * @throws \Exception
+ */
+ public function run($argument) {
+ $this->manager->cleanup();
+ }
+}