code: def clear_old_log_entries():
      
      if hasattr(settings, 'DJANGO_CRON_DELETE_LOGS_OLDER_THAN'):
          delta = timedelta(days=settings.DJANGO_CRON_DELETE_LOGS_OLDER_THAN)
          CronJobLog.objects.filter(end_time__lt=get_current_time() - delta).delete()
docs: Removes older log entries, if the appropriate setting has been set