def METHOD_NAME(self, period, taskFunc, taskArgs=(), executions=0, elapsedTime=0):
    if not callable(taskFunc):
        return S_ERROR(f"{str(taskFunc)} is not callable")
    period = max(period, self.__minPeriod)
    elapsedTime = min(elapsedTime, period - 1)
    md = hashlib.md5()
    task = {
        "period": period,
        "func": taskFunc,
        "args": taskArgs,
    }
    md.update(str(task).encode())
    taskId = md.hexdigest()
    if taskId in self.__taskDict:
        return S_ERROR(f"Task {taskId} is already added")
    if executions:
        task["executions"] = executions
    self.__taskDict[taskId] = task
    retVal = self.__scheduleTask(taskId, elapsedTime)
    if not retVal["OK"]:
        return retVal
    self.__createExecutorIfNeeded()
    return S_OK(taskId)