Build task depending on task type