Skip to content

Commit a34a9e5

Browse files
committed
[ecash-herald] patch cron bug to send daily summaries at midnight UTC
Summary: Send every day not every hour Test Plan: confirm in https://www.npmjs.com/package/cron docs Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D16969
1 parent d3f9fae commit a34a9e5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/ecash-herald/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ const { handleUtcMidnight } = require('./src/events');
1919

2020
// Cron job for daily summaries
2121
const job = new cron.CronJob(
22-
'0 0 * * * *', // cronTime
22+
// see https://www.npmjs.com/package/cron
23+
// seconds[0-59] minutes[0-59] hours[0-23] day-of-month[1-31] month[1-12] day-of-week[0-7]
24+
'0 0 0 * * *', // cronTime
2325
() => handleUtcMidnight(chronik, telegramBot, dailyChannelId), // onTick
2426
null, // onComplete
2527
false, // start

0 commit comments

Comments
 (0)