Add task management function
Add task management function