def _create_scheduled_actions(conn, as_name, scheduled_actions):
    '''
    Helper function to create scheduled actions
    '''
    if scheduled_actions:
        for name, action in scheduled_actions.iteritems():
            if 'start_time' in action and isinstance(action['start_time'], six.string_types):
                action['start_time'] = datetime.datetime.strptime(
                    action['start_time'], DATE_FORMAT
                )
            if 'end_time' in action and isinstance(action['end_time'], six.string_types):
                action['end_time'] = datetime.datetime.strptime(
                    action['end_time'], DATE_FORMAT
                )
            conn.create_scheduled_group_action(as_name, name,
                desired_capacity=action.get('desired_capacity'),
                min_size=action.get('min_size'),
                max_size=action.get('max_size'),
                start_time=action.get('start_time'),
                end_time=action.get('end_time'),
                recurrence=action.get('recurrence')
            )
dataset/ETHPy150Open saltstack/salt/salt/modules/boto_asg.py/_create_scheduled_actions/original