Skip to content

Commit

Permalink
Issue #215: Send review reminders on Sundays in bc_dc_cron()
Browse files Browse the repository at this point in the history
  • Loading branch information
lkmorlan committed Dec 7, 2023
1 parent 448a511 commit 1ff1fa9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions html/modules/custom/bc_dc/bc_dc.module
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,11 @@ function bc_dc_cron(): void {
// Record that this function has run.
\Drupal::state()->set('bc_dc.cron_last_run', $request_time);

// Send review reminders.
$reviewReminder = \Drupal::service('bc_dc.review_reminder');
$reviewReminder->sendRemindersToAllUsers();
// Send review reminders on Sundays.
if (idate('w', $request_time) === 0) {
$reviewReminder = \Drupal::service('bc_dc.review_reminder');
$reviewReminder->sendRemindersToAllUsers();
}
}

/**
Expand Down

0 comments on commit 1ff1fa9

Please sign in to comment.