'Returns data from Cron object as a list of Yaml statements.'

def ToYaml(self):

    statements = [('-    url:    %s' % self._SanitizeForYaml(self.url)), ('        schedule:    %s' % self._SanitizeForYaml(self.schedule))]
    for optional in ('target', 'timezone', 'description'):
        field = getattr(self, optional)
        if field:
            statements.append(('        %s:    %s' % (optional, self._SanitizeForYaml(field))))
    retry_parameters = getattr(self, 'retry_parameters', None)
    if retry_parameters:
        statements += retry_parameters.GetYamlStatementsList()
    return statements
