I would like to run a database clean-up php program when a record is saved, Presently it is set to run every minute which is fine but impractical, as it really only needs to be run after a update or save has been submitted.
I would like to thank you very much for your help. Just in case anyone else has this question, this is what I did as a test and it worked (sending me an email after a lead had been saved).
created a hook in /custom/modules/Leads/logic_hooks.php