

def enable(**kwargs):
    "\n    Enable all scheduled jobs on the minion\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' schedule.enable\n    "
    ret = {
        'comment': [],
        'result': True,
    }
    if (('test' in kwargs) and kwargs['test']):
        ret['comment'] = 'Schedule would be enabled.'
    else:
        try:
            eventer = salt.utils.event.get_event('minion', opts=__opts__)
            res = __salt__['event.fire']({
                'func': 'enable',
            }, 'manage_schedule')
            if res:
                event_ret = eventer.get_event(tag='/salt/minion/minion_schedule_enabled_complete', wait=30)
                if (event_ret and event_ret['complete']):
                    schedule = event_ret['schedule']
                    if (('enabled' in schedule) and schedule['enabled']):
                        ret['result'] = True
                        ret['comment'] = 'Enabled schedule on minion.'
                    else:
                        ret['result'] = False
                        schedule['comment'] = 'Failed to enable schedule on minion.'
                    return ret
        except KeyError:
            ret['comment'] = 'Event module not available. Schedule enable job failed.'
    return ret

dataset/ETHPy150Open saltstack/salt/salt/modules/schedule.py enable/VarMisuse@179/329 `ret`->`schedule`