Manage scanner task lifetime.