mark background task as ended when OS calls the expiration handler