Update init_cron.py

This commit is contained in:
dami 2025-10-14 18:32:17 +08:00
parent 4c58c86f84
commit 657eca08bf
1 changed files with 26 additions and 0 deletions

View File

@ -60,6 +60,32 @@ def init_acme_cron():
crontab.instance().add(params)
return True
def init_auto_update():
name = "[可删]面板自动更新"
res = mw.M("crontab").field("id, name").where("name=?", (name,)).find()
if res:
return True
cmd = "mw dev"
params = {
'name': name,
'type': 'month-n',
'week': "",
'where1': "1",
'hour': 4,
'minute': 15,
'save': "",
'backup_to': "",
'stype': "toShell",
'sname': '',
'sbody': cmd,
'url_address': '',
'attr':'',
}
crontab.instance().add(params)
return True
# 识别linux计划任务
def init_cron():
file = ''