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

Run Cron Job without Crontab #131

Closed thimma11 closed 6 years ago

thimma11 commented 6 years ago

Hi, kinda stupid question, but is it possible to run cron jobs without creating a cronjob in linux (crontab -e). Otherwise, why would you specify the schedule in the cron class, altough it's already specified in the cronjob itself?

maxim-kht commented 6 years ago

Hi @thimma11, no, it is not possible - in order for django-cron to work, it needs cronjob to execute it. Specifying the schedule in the cron classes allows you to put all the logic regarding scheduling your Django tasks into a module inside Django. Otherwise you would need to manually create cron command and Django management command for each task you want to execute separately.