Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import schedule
- import time
- from datetime import date
- from distutils.dir_util import copy_tree
- import calendar
- def file_backup():
- current_weekday = calendar.day_name[date.today().weekday()].upper()
- src = 'E:/some'
- dst = f'E:/test/{current_weekday}'
- copy_tree(src, dst)
- print("Starting backup...")
- schedule.every().day.at("20:51").do(file_backup)
- while 1:
- schedule.run_pending()
- time.sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement