I wrote a function to evaluate Lisp forms when an #orgmode task changes state (e.g. marked as DONE). The forms are stored as properties inside the task:
* TODO Some task
:PROPERTIES:
:ON_PROGRESS: (message "Busy!")
:ON_DONE: (message "Done!")
:END:
Simply add the function to org-after-todo-state-change-hook.
#emacs