diff --git a/lib/controllers/agendash.js b/lib/controllers/agendash.js index ef770e8a..ecfdc2c3 100644 --- a/lib/controllers/agendash.js +++ b/lib/controllers/agendash.js @@ -9,7 +9,7 @@ module.exports = function (agenda, options) { const collection = agenda._collection.collection || agenda._collection; collection.createIndexes( [ - { key: { nextRunAt: -1, lastRunAt: -1, lastFinishedAt: -1 } }, + { key: { repeatInterval: -1, nextRunAt: -1, lastRunAt: -1, lastFinishedAt: -1 } }, { key: { name: 1, nextRunAt: -1, lastRunAt: -1, lastFinishedAt: -1 } }, ], (error) => {