Execute command on deletion

Does anyone know if there is a way to 'prime' an object in maya, so that when it is deleted a MEL script is exectuted?

i think yu can do things like that with the "scriptjob" command. have a look into it.