(schedule_id, recipients, start_date=None)
:param schedule_id: the TimedSchedule schedule_id
    :param start_date: the date to start the TimedSchedule
    :param recipients: a list of (recipient_type, recipient_id) tuples; the
    recipient type should be one of the values checked in ScheduleInstance.recipient
:param schedule_id: the TimedSchedule schedule_id
    :param start_date: the date to start the TimedSchedule
    :param recipients: a list of (recipient_type, recipient_id) tuples; the
    recipient type should be one of the values checked in ScheduleInstance.recipient
: param schedule_id : the TimedSchedule schedule_id : param start_date : the date to start the TimedSchedule : param recipients : a list of ( recipient_type recipient_id ) tuples ; the recipient type should be one of the values checked in ScheduleInstance . recipient
def refresh_timed_schedule_instances(schedule_id, recipients, start_date=None):
    """
    :param schedule_id: the TimedSchedule schedule_id
    :param start_date: the date to start the TimedSchedule
    :param recipients: a list of (recipient_type, recipient_id) tuples; the
    recipient type should be one of the values checked in ScheduleInstance.recipient
    """
    with CriticalSection(['refresh-timed-schedule-instances-for-%s' % schedule_id.hex], timeout=5 * 60):
        schedule = TimedSchedule.objects.get(schedule_id=schedule_id)
        TimedScheduleInstanceRefresher(
            schedule,
            recipients,
            get_timed_schedule_instances_for_schedule(schedule),
            start_date=start_date
        ).refresh()
def refresh_timed_schedule_instances ( schedule_id , recipients , start_date = None ) : with CriticalSection ( [ 'refresh-timed-schedule-instances-for-%s' % schedule_id . hex ] , timeout = 5 * 60 ) : schedule = TimedSchedule . objects . get ( schedule_id = schedule_id ) TimedScheduleInstanceRefresher ( schedule , recipients , get_timed_schedule_instances_for_schedule ( schedule ) , start_date = start_date ) . refresh ( )