From f49d21d7b415e33bd759ce1ce7c6aaeef56889f7 Mon Sep 17 00:00:00 2001 From: Keith Holliday Date: Sat, 20 May 2017 18:38:53 -0600 Subject: [PATCH] added next due date as today for weekly --- website/common/script/cron.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;