modify alerts and add revoke task function when delete the period