I am using crontab in django and my OS is ubuntu
def my_scheduled_job():
print("1")
This is code in settings.py
CRONJOBS = [
('*/1 * * * *', 'stocks.cron.my_scheduled_job')
]
If I run
python3 manage.py crontab run #with hash
it runs the function and print it, but it does not run when I run server. What should I do.
It was my code in crontab
crontab -e
*/1 * * * * /usr/bin/python3 /home/stockstelegraph/manage.py crontab run 6b918d2422a9f4fce735a3383cee6485 # django-cronjobs