My djcelery tasks run locally but not remotely?
<p>I have automated tasks working locally but not reomotely in my django app. I was watching a tutorial and the guy said to stop my worker. but before I did that I put my app in maintenance mode, that didn't work. then I ran</p>

<pre><code>heroku ps:restart
</code></pre>

<p>that didn't work, then I ran </p>

<pre><code>heroku ps:stop worker
</code></pre>

<p>which outputed </p>

<pre><code> Warning: The dynos in your dyno formation will be automatically restarted.
</code></pre>

<p>then I ran </p>

<pre><code>heroku ps:scale worker=1
</code></pre>

<p>and still nothing. I remind those who are reading this that it worked locally. What am I missing?</p>

<p>my procfile</p>

<pre><code>web: gunicorn gettingstarted.wsgi --log-file -
worker: celery worker -A blog -l info.
</code></pre>

<p>While researching I'm seeing mentions of adding beat to the procfile. 2 mentions in fact but this was not discussed in the tutorial I watched. only time celery beat was mentioned is when I added this to the settings.py file</p>

<pre><code>CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler'
</code></pre>

<p>and just in case it makes a difference I'm using the djcelery gui to set periodic tasks not configuring the sceduler in the settings.py like I see in a majority of the examples. </p>

<p>If I run the task in my view and call it, it works. But it wont run if I set it up using djcelery</p>

<p>I read the docs and realized I had to add to my worker procfile</p>

<pre><code>-B
</code></pre>

<p>so it now looks like this</p>

<pre><code>celery -A proj worker -B -l info
</code></pre>

<p>after I made the change I did this</p>

<pre><code>heroku ps:scale worker=0
</code></pre>

<p>then</p>

<pre><code>git add .
git commit -am 'added -B'
git push heroku master
</code></pre>

<p>then I </p>

<pre><code>heroku ps:scale worker=1
</code></pre>

<p>then so I could see the output from heroku</p>

<pre><code>heroku logs -t -p worker
</code></pre>

<p>and created a schedule in my admin and it worked. I saw the output in the console. Hope this helps. NOTE it says it's not recomended for production not sure why but if you know or find out let me know</p>

python django heroku task crontab