From 0f71e097081bfb281a2a67f45b65a6e83f471b1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20K=C3=A1lm=C3=A1n?= Date: Wed, 17 Jan 2024 19:11:26 +0100 Subject: [PATCH] use same order in the admin as in the cron schedule expression --- django_celery_beat/models.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/django_celery_beat/models.py b/django_celery_beat/models.py index 4f3e1578..78adff2c 100644 --- a/django_celery_beat/models.py +++ b/django_celery_beat/models.py @@ -274,14 +274,6 @@ class CrontabSchedule(models.Model): 'Cron Hours to Run. Use "*" for "all". (Example: "8,20")'), validators=[validators.hour_validator], ) - day_of_week = models.CharField( - max_length=64, default='*', - verbose_name=_('Day(s) Of The Week'), - help_text=_( - 'Cron Days Of The Week to Run. Use "*" for "all", Sunday ' - 'is 0 or 7, Monday is 1. (Example: "0,5")'), - validators=[validators.day_of_week_validator], - ) day_of_month = models.CharField( max_length=31 * 4, default='*', verbose_name=_('Day(s) Of The Month'), @@ -298,6 +290,14 @@ class CrontabSchedule(models.Model): '(Example: "1,12")'), validators=[validators.month_of_year_validator], ) + day_of_week = models.CharField( + max_length=64, default='*', + verbose_name=_('Day(s) Of The Week'), + help_text=_( + 'Cron Days Of The Week to Run. Use "*" for "all", Sunday ' + 'is 0 or 7, Monday is 1. (Example: "0,5")'), + validators=[validators.day_of_week_validator], + ) timezone = timezone_field.TimeZoneField( default=crontab_schedule_celery_timezone,