I need to automate the backup of AEM via cron job and on completion of backup, it should send a email stating "Backup has been complete". And, in case, somebody cancelled the backup, it should send messages like "Backup Cancelled".
AEM backup automation via cron job is done. Part that is left is, how to get to know if backup still in progress, completed or cancelled and send these messages via email.
Is it possible to do that?
I dont think there are any events that can give the status. Only option I could think of is, parsing the logs we may be able to get it.
As Lokesh said there are no events that can give the status.
have you explored using a JMX call to determine the status of a backup?  On the Repository MBean there is a property BackupInProgress
I haven't done what you are trying to do myself, but so best to explore. Are you triggering the backup using a curl command? 
Here is a script  you could modify or use?
When the backup starts, AEM creates an empty file backupInProgress.txt at the root of the backup directory and removes it when the backup is complete. The presence of this file indicate backup is in progress and its absence indicate backup has been completed.
You could use this for your scripting.
But, if we cancel the backup, in that case also, backprogress file is gone, Then, how to find out if backup completed or cancelled?
I tried to capture jmx console using curl command and stored output in a file and from there checked the status of backup.
It works file. 🙂
curl -u admin:admin http://localhost:4502/system/console/jmx/com.adobe.granite%3Atype%3DRepository > $LOG_FILE_STATUS if grep -q -i 'Backup canceled' $LOG_FILE_STATUS
How do you cancel online backup if you are backing up to certain folder? With backing up to zip file, we can see the process via UI and can cancel it right away.