celery periodic tasks not executing : <p>I am learning celery and I created a project to test my configuration. I installed <code>celery==4.0.0</code> and <code>django-celery-beat==1.0.1</code> according to the latest documentation.</p>

<p>In drf_project(main project dir with manage.py)/drf_project/celery.py</p>

<pre><code>from __future__ import absolute_import, unicode_literals
from celery import Celery
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'drf_project.settings')
app = Celery('drf_project')
app.config_from_object('django.conf:settings', namespace='CELERY')
app.autodiscover_tasks()
</code></pre>

<p>In drf_project/drf_project/settings.py</p>

<pre><code>INSTALLED_APPS += ('django_celery_beat',)
CELERYBEAT_SCHEDULE = {
    "test_1": {
        "task": "tasks.print_test",
        "schedule": timedelta(seconds=2),
    },
}
</code></pre>

<p>In drf_project/drf_project/<strong>init</strong>.py</p>

<pre><code>from __future__ import absolute_import, unicode_literals
from .celery import app as celery_app

__all__ = ['celery_app']
</code></pre>

<p>In my user_management app (drf_project/user_mangement/) I added a tasks.py </p>

<pre><code>from celery import Celery
from time import strftime

app = Celery()

@app.task
def print_test():
    print strftime('%Y-%m-%d %H:%M:%S')
    with open('abc.txt', 'ab+') as test_file:
        test_file.writeline(strftime('%Y-%m-%d %H:%M:%S'))
</code></pre>

<p>when i run the celery worker and my django project dev server in different terminals by:</p>

<pre><code> celery -A drf_project worker -l info
</code></pre>

<p>and</p>

<pre><code> python manage.py runserver
</code></pre>

<p>I can see my task in celery log like:</p>

<pre><code>[tasks]
   . user_management.tasks.print_test
</code></pre>

<p>But it is not executing. Also I am not getting any error. SO what I am doing wrong? I followed the official documentation of celery.</p>
