diff --git a/mycaldav/cron.py b/mycaldav/cron.py index 89a7351..6ff1f26 100644 --- a/mycaldav/cron.py +++ b/mycaldav/cron.py @@ -8,6 +8,7 @@ class InitTaskSync(CronJobBase): RUN_EVERY_MIN = 1 schedule = Schedule(run_at_times=RUN_AT_TIMES,) + #schedule = Schedule(run_every_mins=RUN_EVERY_MIN,) code = 'reskreen.init_sync_task' # Un code unique pour votre tâche cron def do(self): diff --git a/mycaldav/models.py b/mycaldav/models.py index aa2548c..a1b2459 100644 --- a/mycaldav/models.py +++ b/mycaldav/models.py @@ -51,16 +51,16 @@ class caldav_sync_manager(models.Model): self.copy_caldav_data(today) print(f"synced events") else: - print("pas de copy, sync déjà fait") + print("Aujourd'hui: pas de copy, sync déjà fait") last_month = today - relativedelta(months=1) - print(f"test du mois précédant: {last_month.date}") + print(f"test du mois précédant: {last_month.strftime("%d/%m/%Y")}") o_caldav_sync_management = caldav_sync_manager.objects.filter(dtDate=last_month.date()) if not o_caldav_sync_management.exists(): self.copy_caldav_data(last_month) print(f"synced events") else: - print("pas de copy, sync déjà fait") + print("Mois précédant: pas de copy, sync déjà fait")