Tivix/django-cron — pull request #26 by st4lk (2013-11-14 10:32:00+00:00)
Title: access to previous success cron from CronJob instance

I needed to access to previous success cron from my CronJob instance, to get previous success start and end date. This issue shall provide such access:

class MyCronJob(CronJobBase):
RUN_EVERY_MINS = 15 # every 15 minutes

schedule = Schedule(run_every_mins=RUN_EVERY_MINS)
code = 'my_app.my_cron_job' # a unique code

def do(self):
prev_success_cron = self.get_prev_success_cron()
if prev_success_cron is not None:
# access to all fields of models.CronJobLog here