diff --git a/docker/Dockerfile b/docker/Dockerfile index fd53b72..007568c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -93,6 +93,7 @@ RUN mkdir -p /var/log/sigi # schedule cron jobs RUN crontab -l | { cat; echo "* * * * * /usr/local/bin/python ${HOME}/manage.py runjobs minutely >> /var/log/sigi/cron.log 2>&1"; } | crontab - RUN crontab -l | { cat; echo "0 * * * * /usr/local/bin/python ${HOME}/manage.py runjobs hourly >> /var/log/sigi/cron.log 2>&1"; } | crontab - +RUN crontab -l | { cat; echo "0 0/4 * * * /usr/local/bin/python ${HOME}/manage.py runjob importa_gescon >> /var/log/sigi/cron.log 2>&1"; } | crontab - RUN crontab -l | { cat; echo "0 0 * * * /usr/local/bin/python ${HOME}/manage.py runjobs daily >> /var/log/sigi/cron.log 2>&1"; } | crontab - RUN crontab -l | { cat; echo "0 0 * * 0 /usr/local/bin/python ${HOME}/manage.py runjobs weekly >> /var/log/sigi/cron.log 2>&1"; } | crontab - RUN crontab -l | { cat; echo "0 0 1 * * /usr/local/bin/python ${HOME}/manage.py runjobs monthly >> /var/log/sigi/cron.log 2>&1"; } | crontab - diff --git a/sigi/apps/convenios/jobs/daily/importa_gescon.py b/sigi/apps/convenios/jobs/importa_gescon.py similarity index 70% rename from sigi/apps/convenios/jobs/daily/importa_gescon.py rename to sigi/apps/convenios/jobs/importa_gescon.py index c0c2f51..2b56f43 100644 --- a/sigi/apps/convenios/jobs/daily/importa_gescon.py +++ b/sigi/apps/convenios/jobs/importa_gescon.py @@ -2,12 +2,11 @@ import datetime import docutils.core from django.core.mail import mail_admins from django.utils.translation import gettext as _ -from django_extensions.management.jobs import DailyJob from sigi.apps.convenios.models import Gescon -from sigi.apps.utils.management.jobs import JobReportMixin +from sigi.apps.utils.management.jobs import JobReportMixin, QuarterDailyJob -class Job(JobReportMixin, DailyJob): +class Job(JobReportMixin, QuarterDailyJob): help = "Carga de dados do Gescon." def do_job(self):