Tivix / django-cron

Write cron business logic as a Python class and let this app do the rest! It enables Django projects to schedule cron tasks, tracks their success / failures, manages contention (via a cache) etc. Basically takes care of all the boring work for you :-)
www.tivix.com
MIT License
900 stars 193 forks source link

Windows path not found for django_crontab #146

Closed xporium closed 2 years ago

xporium commented 5 years ago

Hello All,

I am trying to use django_crontab to run repetitive task. I want to insert records to database on a particular time. Also, I am in process of learning django hence I m trying to reach every aspect of django.

The issue i am facing i m able to configure django_crontab but its not able to find cron.py. I am using windows 10 and i believe it must be something else for windows

CRONJOBS = [ ('/2 *', 'test.test_app.cron.my_scheduled_job') ]

testis my project directory.

When I run the command manage.py crontab add it gives error saying "The system cannot find the path specified."

I am using Windows.

Please help..

progressify commented 5 years ago

have you found a solution? this lib work on windows? thank you

msopko81 commented 5 years ago

This library does work on windows, but it looks like you are using django-crontab and not this library django-cron. Windows does not have a crontab. You can use the task scheduler to set up a job to run the management command. You can take a look at #145 in which I explain how I have my task set up.