#!/usr/bin/env python
#0:0:07 everyday upload gateway.db to server to backup
import time
from datetime import datetime, timedelta
from time import sleep

SECONDS_PER_DAY = 24 * 60 * 60

def doFunc():
    print('do Function...')

def doFirst():
  curTime = datetime.now()
  print(curTime)
  desTime = curTime.replace(hour=0, minute=0, second=7, microsecond=0) #0:0:07
  print(desTime)
  delta = desTime-curTime
  sleeptime = delta.total_seconds()
  print("Now day must sleep %d seconds" % sleeptime)
  sleep(sleeptime)
  doFunc()

if __name__ == "__main__":
  doFirst()

@@ -146,16 +146,31 @@
 t sleep%0A
+import requests
 %0ASECONDS
@@ -214,28 +214,305 @@
 :%0A  
-  print('do Function
+import requests%0A %0A  url = 'http://www.sips/gateway/123456/upload'%0A  files = %7B'file': open('/home/sips/123456/gateway.db', 'rb')%7D%0A  #files = %7B'file': ('report.jpg', open('/home/lyb/sjzl.mpg', 'rb'))%7D      %0A  r = requests.post(url, files=files)%0A  print(r.text)  %0A  print('upload gateway.db to server
 ...'

Update backup_db.py