Factor out the CreateTaskCommand in favor of a more straightforward CreateTask API that can post the command for the caller.