def METHOD_NAME(max_count):
    """Schedule the update of DataCite metadata."""
    task_details = current_cache.get('update_datacite:task_details')
    if task_details is None or 'from_date' not in task_details or 'until_date' not in task_details:
        return
    doi_pids = find_registered_doi_pids(task_details['from_date'],
                                        task_details['until_date'],
                                        current_app.config['ZENODO_LOCAL_DOI_PREFIXES'])
    dois_count = doi_pids.count()
    task_details['left_pids'] = dois_count
    task_details['last_update'] = datetime.utcnow()
    current_cache.set('update_datacite:task_details', task_details, timeout=-1)
    if dois_count == 0:
        if 'finish_date' not in task_details:
            task_details['finish_date'] = datetime.utcnow()
            current_cache.set('update_datacite:task_details', task_details, timeout=-1)
        return
    scheduled_dois_count = max_count if max_count < dois_count else dois_count
    scheduled_dois_pids = doi_pids.limit(scheduled_dois_count)
    for doi_pid in scheduled_dois_pids:
        update_datacite_metadata.delay(doi_pid.pid_value,
                                       str(doi_pid.object_uuid),
                                       task_details['job_id'])