title: How can I set up Django Crontab in Docker container?
body: <p>Let's assume that I would like to run custom management command in Django every day at 12 noon. Server is deployed on Heroku in Docker container. I have in <code>management/commands</code> file <code>myfile.py</code> and I set it up in this way</p>
  
  <pre><code>TIME_ZONE = 'UTC'
  CRONJOBS = [
      ('* 12 * * *', 'django.core.management.call_command', ['myfile']),
  ]
  </code></pre>
  
  <p>I added <code>django-crontab</code> to the <code>requirements.txt</code> and <code>'django_crontab'</code> in <code>INSTALLED_APPS</code>. This file should add data to the PostgreSQL database however it doesn't work. Any ideas how can I do that? It seems to me that there is a problem with Docker. Maybe I should use Celery scheduler instead?</p>
  
  <p><strong>UPDATE</strong>
  I solved my problem using <a href="https://devcenter.heroku.com/articles/clock-processes-python" rel="nofollow noreferrer">Heroku APScheduler</a>. But If anyone knows how this can be resolved for instance with celery or crontab I would be grateful for the answer.</p>