Improve code for remove_blocked_hosts cron task mgmt.