开发者

Rake:task equivalent in Django

I have a django application where i'll like to have a script that i'll run once a day to validate the models in the database, and delete some objects. How cand i make it ? I want something equival开发者_如何学编程ent to rake:task in rails.


Also look at setting up a custom subcommand for your manage.py.


Try this: django-tasks


May be celery would be better in this case.

Because as stated in django-tasks page:

Django-tasks is for a different usage from most other tasks frameworks (Celery, Cue...): this is not for numerous, quick, light, tasks, but for few, long, heavy, tasks. Typical usage is to batch process data for each model object, and give information about the processing to the user.

So it depends on the purpose.


Although it is more commonly used for application deployment and system administration, Fabric might be interesting.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜