Source

Simple_BackUP / backup.py

Diff from to

backup.py

 #!/usr/bin/env python
+# -*- coding: utf-8 -*-
 ##########################################################################
 #BACKUP FILES company "AlieParusa"                                       #
 ##########################################################################
 import xml.parsers.expat
 import tarfile
 import os
+import modules
 from datetime import datetime
 
 #List of path backup from XML file with name is "path.xml"
         log.write(datetime.now().strftime('%Y'"."'%m'"."'%d'" "'%H'":"'%m')+" Finish task:\n")
         log.close()
         tar.close()
+#Send email          
+        modules.Sendemail(fro_m='service@redsails.ru', to='backup@redsails.ru', body='Job '+str(i)+' is done.' , subject='BackUP')
 #Run processing
 Archive(Path())