Update Redis key for Monday message tracking to
This commit is contained in:
@@ -185,10 +185,10 @@ function GoalsProgressAlertsCron(): void
|
||||
// Run department overview goals mondays
|
||||
if ((int)date('N') === 1) {
|
||||
// Check if the time is between 07:00 and 17:00
|
||||
if (!redis->exists('system:last_sent_monday_message') && (date('H') >= 7 && date('H') < 17)) {
|
||||
if (!redis->exists('system:last_sent_monday_message_v2') && (date('H') >= 7 && date('H') < 17)) {
|
||||
// Set the key to expire in 24 hours
|
||||
redis->set('system:last_sent_monday_message', (string)time());
|
||||
redis->expire('system:last_sent_monday_message', 86400);
|
||||
redis->set('system:last_sent_monday_message_v2', (string)time());
|
||||
redis->expire('system:last_sent_monday_message_v2', 86400);
|
||||
$department = new departments_o();
|
||||
$days = 7;
|
||||
// The time should be from 00:00:00 of the start date to 23:59:59 of the end date
|
||||
|
||||
Reference in New Issue
Block a user