Stop looping tasks when the plugin is deactivated.
Stop looping tasks when the plugin is deactivated, and thread checks.