django cron在openshift上运行

django cron在openshift上运行,django,cron,openshift,Django,Cron,Openshift,如何在openshift PaaS上运行cron任务?我在localhost上开发时使用了“django_crontab”。但是openshift有自己的cron盒带。我曾经在本地主机上生成cron,它看起来是这样的: #1 1 * * * /usr/bin/python /home/lucas03/django/openshift/digrin/wsgi/digrin/manage.py crontab run 66ba8f74039710e3439ebaa1479f55b2 # dja

如何在openshift PaaS上运行cron任务?我在localhost上开发时使用了“django_crontab”。但是openshift有自己的cron盒带。我曾经在本地主机上生成cron,它看起来是这样的:

#1 1 * * *  /usr/bin/python /home/lucas03/django/openshift/digrin/wsgi/digrin/manage.py crontab run 66ba8f74039710e3439ebaa1479f55b2   # django-cronjobs for controller
#1 1 * * *  /usr/bin/python /home/lucas03/django/openshift/digrin/wsgi/digrin/manage.py crontab run 3e633e4b25213cc3f8a16cd8909fb269   # django-cronjobs for controller
#1 5 * * *  /usr/bin/python /home/lucas03/django/openshift/digrin/wsgi/digrin/manage.py crontab run 01cf5c08eb3017a88cdaabf52561fa2b   # django-cronjobs for controller
然后我使用散列并在openshift上运行相同的代码。例如,我将这个bash放在了我的.openshift/weekly/watcher中

#!/bin/bash
/var/lib/openshift/6ff0000UUID/python/virtenv/bin/python /var/lib/openshift/6ff0000UUID/app-root/runtime/repo/wsgi/digrin/manage.py crontab run 66ba8f74039710e3439ebaa1479f55b2  
但是我得到了
语法错误
TypeError:“NoneType”对象没有属性“\uu getitem\uuu”
。当我尝试在./manage.py shell中运行该方法时,它工作正常。我的方式感觉很愚蠢。如何在openshift上运行cron作业?

以下是解决方案。 我更改了django cron应用程序名称,并使用了从localhost生成的cron哈希。我在openshift上生成了新的,并且它可以正常工作。愚蠢的错误