We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 486367e commit a32001aCopy full SHA for a32001a
django_celery_beat/models.py
@@ -117,6 +117,15 @@ def maybe_make_aware(self, dt):
117
return dt
118
119
120
+class TZNaiveCronSchedule(schedules.crontab):
121
+
122
+ def maybe_make_aware(self, dt):
123
+ """
124
+ Overriding the base method, to be a no-op and returning the dt as is.
125
126
+ return dt
127
128
129
@python_2_unicode_compatible
130
class IntervalSchedule(models.Model):
131
"""Schedule executing every n seconds."""
@@ -225,7 +234,7 @@ def __str__(self):
225
234
226
235
@property
227
236
def schedule(self):
228
- crontab = schedules.crontab(
237
+ crontab = TZNaiveCronSchedule(
229
238
minute=self.minute,
230
239
hour=self.hour,
231
240
day_of_week=self.day_of_week,
0 commit comments