def METHOD_NAME():           # taskUpdateOne
    task_retention_days = get_environment_variable_default("SCHEDULED_TASKS_RETAIN_HISTORY", 90)  #
    success = False
    try:
        task_retention_days_int = int(task_retention_days)
        nowdt = datetime.now(pytz.timezone("America/Los_Angeles"))
        limit_dt = nowdt - timedelta(days=task_retention_days_int)
        # print("task_retention_days: " + str(task_retention_days))
        BackgroundTaskOutputManager().delete_older_tasks(limit_dt=limit_dt)
        WeTaskCompleted().delete_older_tasks(limit_dt=limit_dt)
        success = True
    except Exception as e:
        logger.error("limit_task_history threw: " + str(e))
    return success