i have created a scheduled job in django with django_crontab package. i have added the job. its successfully added but its only get executed whenever i run python manage.py crontab run daeea9e88c171494b1610bdebfasd123 not with runserver command. what might be the issue, this is my view.
cron.py file
def my_scheduled_job():
file = open('geek.txt','w')
now = timezone.now()
file.write("This is the write command")
file.write("It allows us to write in a particular file")
file.write(str(now))
file.close()
print(now)
return True
settings.py
CRONTAB_LOCK_JOBS = False
CRONTAB_DJANGO_PROJECT_NAME = 'api'
CRONTAB_DJANGO_SETTINGS_MODULE = 'api.settings'
CRONJOBS = [
('*/1 * * * *', 'app.cron.my_scheduled_job')
]
what i want is its job get executed every minute whenever i run python manage.py runserver. Is there anything missing please help me out.