expressgy 1 year ago
parent e9b627551e
commit 861b720fc6
  1. 27
      server.js

@ -63,23 +63,24 @@ function back(){
// 开始备份数据库
function startBackSQL(){
// 数据库信息
let host = "localhost"
, user = "root"
, passwd = "root"
, database = "develop"
backSQL(host, user, passwd, database)
const outTime = getT() - new Date().getTime()
for(let item in DATABASELIST){
const i = DATABASELIST[item];
database = i;
setTimeout(() => {
setInterval(() => {
backSQL(host, user, passwd, database)
}, 1000 * 60 * mintues)
},outTime)
console.log(i)
// 数据库信息
let host = "localhost", user = "root", passwd = "root", database = i
runBackFunc(host, user, passwd, database)
}
}
function runBackFunc(host, user, passwd, database){
backSQL(host, user, passwd, database)
const outTime = getT() - new Date().getTime()
setTimeout(() => {
setInterval(() => {
backSQL(host, user, passwd, database)
}, 1000 * 60 * mintues)
},outTime)
}
/**
* 根据系统类型读取编码格式
* */

Loading…
Cancel
Save