Fixing today, recurring stuff in the calendar. finally
This commit is contained in:
parent
c1be3c55de
commit
62cdf35e60
@ -20,7 +20,7 @@ const weather = require('./today/weather');
|
|||||||
const trains = require('./today/trains');
|
const trains = require('./today/trains');
|
||||||
const history = require('./today/history');
|
const history = require('./today/history');
|
||||||
const mdMailer = require('./today/mailer');
|
const mdMailer = require('./today/mailer');
|
||||||
const mdFitbit = require('./today/fitbit');
|
// const mdFitbit = require('./today/fitbit');
|
||||||
const todayFTSE = require('./today/todayftse');
|
const todayFTSE = require('./today/todayftse');
|
||||||
const quotes = require('./today/quotes');
|
const quotes = require('./today/quotes');
|
||||||
// var db_name = 'silvrgit';
|
// var db_name = 'silvrgit';
|
||||||
@ -408,14 +408,14 @@ module.exports = {
|
|||||||
console.error(e);
|
console.error(e);
|
||||||
});
|
});
|
||||||
|
|
||||||
mdFitbit.getYesterdayFitbit()
|
/*mdFitbit.getYesterdayFitbit()
|
||||||
.then((d) => {
|
.then((d) => {
|
||||||
todayCache.data.fitbit = d;
|
todayCache.data.fitbit = d;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
'use strict';
|
'use strict';
|
||||||
console.error(e);
|
console.error(e);
|
||||||
});
|
});*/
|
||||||
|
|
||||||
todayCache.date = breakDay();
|
todayCache.date = breakDay();
|
||||||
},
|
},
|
||||||
@ -441,6 +441,7 @@ setTimeout(function () {
|
|||||||
}, 5000);
|
}, 5000);
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
logger.debug('Going to do the email...');
|
||||||
mdMailer.sendEmailV1(todayCache, __dirname);
|
mdMailer.sendEmailV1(todayCache, __dirname);
|
||||||
saveToDB(todayCache);
|
saveToDB(todayCache);
|
||||||
saveData();
|
saveData();
|
||||||
@ -465,14 +466,6 @@ cron.schedule('15 7 * * *', function () {
|
|||||||
return -1;
|
return -1;
|
||||||
});
|
});
|
||||||
|
|
||||||
cron.schedule('0 */1 * * *', function () {
|
|
||||||
// Module.exports.refreshTrainAndWeather();
|
|
||||||
// this.refreshTrain();
|
|
||||||
module.exports.refreshWeather();
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
});
|
|
||||||
|
|
||||||
cron.schedule('30 7 * * *', function () {
|
cron.schedule('30 7 * * *', function () {
|
||||||
mdMailer.sendEmailV1(todayCache, __dirname);
|
mdMailer.sendEmailV1(todayCache, __dirname);
|
||||||
// saveToDB(todayCache);
|
// saveToDB(todayCache);
|
||||||
|
Loading…
Reference in New Issue
Block a user