Cron tweet tasks enabled/disabled
This commit is contained in:
parent
21531d1fd2
commit
4dfdd48e6a
2 changed files with 41 additions and 30 deletions
|
|
@ -36,6 +36,10 @@ Meteor.startup(() => {
|
|||
// collectionTTL: 172800
|
||||
});
|
||||
|
||||
const esEn = Meteor.settings.private.twitter.es.enabled;
|
||||
const enEn = Meteor.settings.private.twitter.en.enabled;
|
||||
|
||||
if (esEn) {
|
||||
SyncedCron.add({
|
||||
name: 'Check for fires stats in Spain and tweet about',
|
||||
timezone: 'Europe/Madrid',
|
||||
|
|
@ -63,7 +67,9 @@ Meteor.startup(() => {
|
|||
* return numbersCrunched;
|
||||
return tweetFires(); */
|
||||
});
|
||||
}
|
||||
|
||||
if (enEn) {
|
||||
SyncedCron.add({
|
||||
name: 'Check for fires stats in Europe and tweet about',
|
||||
timezone: 'Europe/Madrid',
|
||||
|
|
@ -76,6 +82,9 @@ Meteor.startup(() => {
|
|||
},
|
||||
job: () => tweetEuropeFires()
|
||||
});
|
||||
}
|
||||
|
||||
if (esEn || enEn) {
|
||||
SyncedCron.start();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
"ironPassword": "SomePasswordAlLeast32LongYouKnowHowToCount",
|
||||
"twitter": {
|
||||
"es": {
|
||||
"enabled": true,
|
||||
"comment": "using later.js",
|
||||
"when": "at 9:15 am also at 3:15 pm also at 10:00 pm",
|
||||
"consumer_key": "...",
|
||||
|
|
@ -41,6 +42,7 @@
|
|||
"access_token_secret": "..."
|
||||
},
|
||||
"en": {
|
||||
"enabled": true,
|
||||
"comment": "using later.js",
|
||||
"when": "at 9:15 am also at 3:15 pm also at 10:00 pm",
|
||||
"consumer_key": "...",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue