diff --git a/Dockerfile b/Dockerfile index 1486502..56d92f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN apt-get update && apt-get install -y cron RUN chmod 0644 /etc/cron.d/django_crons_jobs && crontab /etc/cron.d/django_crons_jobs && touch /var/log/cron.log -RUN apt update && apt install cron && pip install --no-cache-dir -r requirements.txt +RUN docpip install --no-cache-dir -r requirements.txt RUN python manage.py makemigrations && python manage.py migrate diff --git a/mycaldav/cron.py b/mycaldav/cron.py index 6283bf0..ba71a20 100644 --- a/mycaldav/cron.py +++ b/mycaldav/cron.py @@ -5,8 +5,9 @@ import django class InitTaskSync(CronJobBase): RUN_AT_TIMES = ['07:00', '19:00'] + RUN_EVERY_MIN = 1 - schedule = Schedule(run_at_times=RUN_AT_TIMES,) + schedule = Schedule(run_every_mins=RUN_EVERY_MIN,) code = 'mycaldav.init_sync_task' # Un code unique pour votre tâche cron def do(self):