Fixing today, recurring stuff in the calendar. finally

This commit is contained in:
Martin Donnelly 2017-10-13 10:44:13 +01:00
parent c1be3c55de
commit 62cdf35e60

View File

@ -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);