Cronjob running only once in Django

Viewed 166

I'm trying to do a cronjob for a Django application using the django-cron lib. The problem is that the cronjob only runs once and it should run every minute.

class MyCronJob(CronJobBase):
    RUN_EVERY_MINS = 1

    schedule = Schedule(run_every_mins=RUN_EVERY_MINS, retry_after_failure_mins=RUN_EVERY_MINS)
    code = 'myapp.my_cron_job'

    def do(self):
        # My code

To get around this, I also tried to create the cronjob via crontab, but it didn't work either.

*/1 * * * * source /home/me/.baschrc && source/me/Documents/project/app/source/bin/activate && python source/me/Documents/project/app/manage.py runcrons > source/me/Documents/project/app/cronjob.log
0 Answers
Related