I want to take back-up copy of my network dirs once in a day on specified time, Below is the code of my current work by which i am running it manually.
So i want to do this manual work as windows service which creates a back-up copy of specified network dir on particular time.
import tarfile
import datetime
def backup_htmls():
tar = tarfile.open('./InputHTML_bc/'+datetime.datetime.now().strftime('%b_%d_%Y_%H_%M_%S')+".tar.gz", "w:gz")
tar.add('\\\\192.168.211.65\\shared\\InputHTML\\', arcname="Backup_Tar")
tar.close()
I have the reference of how to run it as a windows service;
i just want how can i run this job once in a day on particular time(for example if i pass time as a parameter to python function and it will execute it once for that day.. or any other way you can do it.. in pythonic way)??? i know it will be very easy but i am not getting the idea from where i can start anyway of doing it???