ThongCoder commited on
Commit
476d0f6
·
verified ·
1 Parent(s): bcdd725

Update backup.py

Browse files
Files changed (1) hide show
  1. backup.py +8 -7
backup.py CHANGED
@@ -65,10 +65,11 @@ def run_backup():
65
  cwd="/tmp",
66
  )
67
 
68
- while True:
69
- print('Backup started.')
70
- try:
71
- run_backup()
72
- except Exception as e:
73
- print("[Backup] Failed:", e)
74
- time.sleep(45 * 60) # 45 minutes
 
 
65
  cwd="/tmp",
66
  )
67
 
68
+ if __name__ == '__main__':
69
+ while True:
70
+ print('Backup started.')
71
+ try:
72
+ run_backup()
73
+ except Exception as e:
74
+ print("[Backup] Failed:", e)
75
+ time.sleep(45 * 60) # 45 minutes