Skip to content

Commit

Permalink
Schedules
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixLusseau committed Jul 6, 2024
1 parent add45bd commit 49f2e38
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions utils/schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,22 @@ function schedule(bot, value, tag, guildID, chanID) {
reportCron[tag + guildID] = cron.schedule(value.substring(3, 5) + ' ' + value.substring(0, 2) + ' * * 5,6,7,1', () => {
reports.report(bot, api, null, null, channel, tag, guildID)
});
// Schedule ffrace and ffattacks with ping at 01h00 and 23h00 on the war days
// Schedule ffrace and ffattacks with ping at 01h00, 21h00 and 23h00 on the war days
cron.schedule('0 1 * * 5,6,7,1', () => {
ffrace.ffrace(bot, api, null, channel, tag, false)
ffattacks.ffattacks(bot, api, null, true, channel, tag, guildID)
});
cron.schedule('0 21 * * 4,5,6,7', () => {
ffrace.ffrace(bot, api, null, channel, tag, false)
ffattacks.ffattacks(bot, api, null, true, channel, tag, guildID)
});
cron.schedule('0 23 * * 4,5,6,7', () => {
ffrace.ffrace(bot, api, null, channel, tag, false)
ffattacks.ffattacks(bot, api, null, true, channel, tag, guildID)
});
// console.log('Scheduled ' + key + ' for ' + value.substring(3, 5) + ' ' + value.substring(0, 2) + ' * * 5,6,7,1')

cron.schedule('55 22 * * 4,5,6,7', () => { // Refresh the guild members list at 22h55 on war days
cron.schedule('55 20 * * 4,5,6,7', () => { // Refresh the guild members list at 20h55 on war days
getGuildMembers(guildsDict)
})
}
Expand Down

0 comments on commit 49f2e38

Please sign in to comment.