Create task factory