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

how to run a cron many times #17

Closed Mark-Shine closed 11 years ago

Mark-Shine commented 11 years ago

i have successfully run my job with commond :"./manager.py runcrons"

i set it : RUN_EVERY_MINS =1 and ALLOW_PARALLEL_RUNS = True however, it just ran once ,then it closed. No matter how long time goes by. so , i have a question : does it just be able to run a job one time successfully ?

dfryta commented 11 years ago

You have to set up crontab to run this command for you. Check documentation:

Now everytime you run the management command python manage.py runcrons all the crons will run if required. Depending on the application the management command can be called from the Unix crontab as often as required. Every 5 minutes usually works for most of my applications.

So if you put ./manager.py runcrons in your Unix crontab (or windows task scheduler) to run every 1 min it will be work.