I would do this with a database trigger. Using the "mute" concept outlined here:
, I would run a query every night checking the alert trigger status, and if it's > 90 days I would update v_mute to true, and the reason to "device over threshold for over 90 days"↧