diff --git a/website/common/script/cron.js b/website/common/script/cron.js index 6e24247b65..124e0f0ce2 100644 --- a/website/common/script/cron.js +++ b/website/common/script/cron.js @@ -134,7 +134,7 @@ export function shouldDo (day, dailyTask, options = {}) { schedule = schedule.every(daysOfTheWeek).daysOfWeek(); if (options.nextDue) { - let dates = schedule.fromDate(startOfDayWithCDSTime).next(6); + let dates = schedule.fromDate(startOfDayWithCDSTime.subtract('1', 'days')).next(6); let filterDates = dates.filter((momentDate) => { let weekDiff = momentDate.week() - moment(startDate).week(); let matchX = weekDiff % dailyTask.everyX === 0;