Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
elunez committed Aug 2, 2022
1 parent 3c2d6b0 commit 77e2e77
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bt_7.7_happy/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# 计划任务
# ------------------------------

from asyncio.windows_events import NULL
import sys
import os
import logging
Expand Down Expand Up @@ -158,12 +159,16 @@ def startTask():
def siteEdate():
global oldEdate
try:
oldEdate = ReadFile('/www/server/panel/data/edate.pl')
if not oldEdate:
oldEdate = ReadFile('/www/server/panel/data/edate.pl')
if not oldEdate:
oldEdate = '0000-00-00'
mEdate = time.strftime('%Y-%m-%d', time.localtime())
if oldEdate == mEdate:
return False
os.system(get_python_bin() +
" /www/server/panel/script/site_task.py > /dev/null")
oldEdate = NULL
except Exception as ex:
logging.info(ex)
pass
Expand Down

0 comments on commit 77e2e77

Please sign in to comment.