Skip to content
This repository was archived by the owner on Apr 6, 2022. It is now read-only.

chore(republik-crowdfundings): Send payment reminders at 10pm, too #710

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion packages/republik-crowdfundings/lib/scheduler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,23 @@ const init = async (context) => {

schedulers.push(
timeScheduler.init({
name: 'payment-reminders',
name: 'payment-reminders-lunch',
context,
runFunc: (_args, context) => sendPaymentReminders(context),
lockTtlSecs,
runAtTime: '12:00',
runAtDaysOfWeek: [1, 2, 3, 4, 5], // Send reminder Monday to Friday
}),
)

schedulers.push(
timeScheduler.init({
name: 'payment-reminders-nightshift',
context,
runFunc: (_args, context) => sendPaymentReminders(context),
lockTtlSecs,
runAtTime: '22:00',
runAtDaysOfWeek: [1, 2, 3, 4, 5], // Send reminder Monday to Friday
}),
)

Expand Down