Verifies that the specified cron job is present for the specified user.
    It is recommended to use `identifier`. Otherwise the cron job is installed
    twice if you change the name.
    For more advanced information about what exactly can be set in the cron
    timing parameters, check your cron system's documentation. Most Unix-like
    systems' cron documentation can be found via the crontab man page:
    ``man 5 crontab``.

    name
        The command that should be executed by the cron job.

    user
        The name of the user whose crontab needs to be modified, defaults to
        the root user

    minute
        The information to be set into the minute section, this can be any
        string supported by your cron system's the minute field. Default is
        ``*``

    hour
        The information to be set in the hour section. Default is ``*``

    daymonth
        The information to be set in the day of month section. Default is ``*``

    month
        The information to be set in the month section. Default is ``*``

    dayweek
        The information to be set in the day of week section. Default is ``*``

    comment
        User comment to be added on line previous the cron job

    commented
        The cron job is set commented (prefixed with ``#DISABLED#``).
        Defaults to False.

        .. versionadded:: 2016.3.0

    identifier
        Custom-defined identifier for tracking the cron line for future crontab
        edits. This defaults to the state name

    special
        A special keyword to specify periodicity (eg. @reboot, @hourly...).
        Quotes must be used, otherwise PyYAML will strip the '@' sign.

        .. versionadded:: 2016.3.0

def present(name,
            user='root',
            minute='*',
            hour='*',
            daymonth='*',
            month='*',
            dayweek='*',
            comment=None,
            commented=False,
            identifier=False,
            special=None):
    '''
    Verifies that the specified cron job is present for the specified user.
    It is recommended to use `identifier`. Otherwise the cron job is installed
    twice if you change the name.
    For more advanced information about what exactly can be set in the cron
    timing parameters, check your cron system's documentation. Most Unix-like
    systems' cron documentation can be found via the crontab man page:
    ``man 5 crontab``.

    name
        The command that should be executed by the cron job.

    user
        The name of the user whose crontab needs to be modified, defaults to
        the root user

    minute
        The information to be set into the minute section, this can be any
        string supported by your cron system's the minute field. Default is
        ``*``

    hour
        The information to be set in the hour section. Default is ``*``

    daymonth
        The information to be set in the day of month section. Default is ``*``

    month
        The information to be set in the month section. Default is ``*``

    dayweek
        The information to be set in the day of week section. Default is ``*``

    comment
        User comment to be added on line previous the cron job

    commented
        The cron job is set commented (prefixed with ``#DISABLED#``).
        Defaults to False.

        .. versionadded:: 2016.3.0

    identifier
        Custom-defined identifier for tracking the cron line for future crontab
        edits. This defaults to the state name

    special
        A special keyword to specify periodicity (eg. @reboot, @hourly...).
        Quotes must be used, otherwise PyYAML will strip the '@' sign.

        .. versionadded:: 2016.3.0
    '''
    name = name.strip()
    if identifier is False:
        identifier = name
    ret = {'changes': {},
           'comment': '',
           'name': name,
           'result': True}
    if __opts__['test']:
        status = _check_cron(user,
                             cmd=name,
                             minute=minute,
                             hour=hour,
                             daymonth=daymonth,
                             month=month,
                             dayweek=dayweek,
                             comment=comment,
                             commented=commented,
                             identifier=identifier,
                             special=special)
        ret['result'] = None
        if status == 'absent':
            ret['comment'] = 'Cron {0} is set to be added'.format(name)
        elif status == 'present':
            ret['result'] = True
            ret['comment'] = 'Cron {0} already present'.format(name)
        elif status == 'update':
            ret['comment'] = 'Cron {0} is set to be updated'.format(name)
        return ret

    if special is None:
        data = __salt__['cron.set_job'](user=user,
                                        minute=minute,
                                        hour=hour,
                                        daymonth=daymonth,
                                        month=month,
                                        dayweek=dayweek,
                                        cmd=name,
                                        comment=comment,
                                        commented=commented,
                                        identifier=identifier)
    else:
        data = __salt__['cron.set_special'](user=user,
                                            special=special,
                                            cmd=name,
                                            comment=comment,
                                            commented=commented,
                                            identifier=identifier)
    if data == 'present':
        ret['comment'] = 'Cron {0} already present'.format(name)
        return ret

    if data == 'new':
        ret['comment'] = 'Cron {0} added to {1}\'s crontab'.format(name, user)
        ret['changes'] = {user: name}
        return ret

    if data == 'updated':
        ret['comment'] = 'Cron {0} updated'.format(name)
        ret['changes'] = {user: name}
        return ret
    ret['comment'] = ('Cron {0} for user {1} failed to commit with error \n{2}'
                      .format(name, user, data))
    ret['result'] = False
    return ret