Added 'onsuccess' and 'onfail' attributes to run commands which notify success or failure