From 62cdf35e60575a8592265776500f4d8acbfcc297 Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Fri, 13 Oct 2017 10:44:13 +0100 Subject: [PATCH] Fixing today, recurring stuff in the calendar. finally --- lib/todayV2.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/todayV2.js b/lib/todayV2.js index 007f7e4..3dcb693 100644 --- a/lib/todayV2.js +++ b/lib/todayV2.js @@ -20,7 +20,7 @@ const weather = require('./today/weather'); const trains = require('./today/trains'); const history = require('./today/history'); const mdMailer = require('./today/mailer'); -const mdFitbit = require('./today/fitbit'); +// const mdFitbit = require('./today/fitbit'); const todayFTSE = require('./today/todayftse'); const quotes = require('./today/quotes'); // var db_name = 'silvrgit'; @@ -408,14 +408,14 @@ module.exports = { console.error(e); }); - mdFitbit.getYesterdayFitbit() + /*mdFitbit.getYesterdayFitbit() .then((d) => { todayCache.data.fitbit = d; }) .catch((e) => { 'use strict'; console.error(e); - }); + });*/ todayCache.date = breakDay(); }, @@ -441,6 +441,7 @@ setTimeout(function () { }, 5000); setTimeout(function () { + logger.debug('Going to do the email...'); mdMailer.sendEmailV1(todayCache, __dirname); saveToDB(todayCache); saveData(); @@ -465,14 +466,6 @@ cron.schedule('15 7 * * *', function () { return -1; }); -cron.schedule('0 */1 * * *', function () { - // Module.exports.refreshTrainAndWeather(); - // this.refreshTrain(); - module.exports.refreshWeather(); - - return -1; -}); - cron.schedule('30 7 * * *', function () { mdMailer.sendEmailV1(todayCache, __dirname); // saveToDB(todayCache);