You could check out the cronjob module for OACS. It only works when the db is up because the job description is in the database. Unforunately the only trigger available is time, not database changes. It runs any SQL and/or any tcl script.