From 30a53269e689766af5094d3fd7641452f5cf4d9a Mon Sep 17 00:00:00 2001 From: bbonf Date: Tue, 26 Nov 2024 09:45:04 +0100 Subject: [PATCH] changed reminder scheduling --- lab/experiments/management/commands/send_reminders.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lab/experiments/management/commands/send_reminders.py b/lab/experiments/management/commands/send_reminders.py index f0ac8341..227009d2 100644 --- a/lab/experiments/management/commands/send_reminders.py +++ b/lab/experiments/management/commands/send_reminders.py @@ -84,8 +84,7 @@ def handle(self, *args, **options): # fetch appoinments 24 hours from now now = timezone.now() threshold_from = now + timedelta(days=1) - d_to = now + timedelta(days=2) - threshold_to = timezone.make_aware(datetime(d_to.year, d_to.month, d_to.day, 0, 0)) + threshold_to = threshold_from + timedelta(hours=1) appointments = Appointment.objects.filter( timeslot__start__gt=threshold_from, timeslot__start__lt=threshold_to, reminder_sent=None