Stop task based on resource usage?