部分代码更新
This commit is contained in:
27
coinbus/nochain_lyq_utc08.py
Normal file
27
coinbus/nochain_lyq_utc08.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import subprocess
|
||||
from datetime import datetime, timedelta
|
||||
import time
|
||||
while True:
|
||||
# 获取当前时间的UTC时间
|
||||
now = datetime.utcnow()
|
||||
|
||||
# 计算到下一个08:00的时间间隔
|
||||
next_run = datetime(now.year, now.month, now.day, 8, 0)
|
||||
if now >= next_run:
|
||||
next_run += timedelta(days=1)
|
||||
sleep_time = (next_run - now).total_seconds()
|
||||
|
||||
# 休眠直到下一个08:00
|
||||
time.sleep(sleep_time)
|
||||
|
||||
# 运行 nochain_lyq_v2.py
|
||||
command1 = f"python3 nochain_lyq_v2.py"
|
||||
subprocess.run(command1, shell=True)
|
||||
|
||||
# 运行 nochain_update_lyq.py
|
||||
command2 = f"python3 nochain_update_lyq.py"
|
||||
subprocess.run(command2, shell=True)
|
||||
|
||||
# 运行 nochain_eth_lyq.py
|
||||
command3 = f"python3 nochain_eth_lyq.py"
|
||||
subprocess.run(command3, shell=True)
|
||||
Reference in New Issue
Block a user