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 write CRON_CLASSES = [ "my_app.cron.MyCronJob"] #16

Closed Mark-Shine closed 11 years ago

Mark-Shine commented 11 years ago

when i run "python manage.py runcrons" i get "make sure these are valid cron class name:[……]"

i have no idea about CRON_CLASSES

dfryta commented 11 years ago

Please check read me at main site:

https://github.com/Tivix/django-cron#installation

Mark-Shine commented 11 years ago

sure ,i have read your instruction already , and did step by step as it says ,however ,it doesn't work.

ps.. i put "CRON_CLASSES"in setting.py is it alright ?

dfryta commented 11 years ago

Yes. Add this into your settings file and fill up with path to your cron class, example:

CRON_CLASSES = [ "my_app.cron.MyCronJob", ]

So in my_app you have cron.py file with MyCronJob class.

Mark-Shine commented 11 years ago

ok i get it ~ thank you for help!