This commit is contained in:
aaron 2025-04-29 00:37:52 +08:00
parent 11815eb985
commit 3547ab677c
2 changed files with 11 additions and 2 deletions

View File

@ -12,6 +12,15 @@ RUN apt-get update && apt-get install -y \
# 复制项目文件
COPY . /app/
# 创建虚拟环境
RUN python -m venv venv
# 激活虚拟环境
RUN source venv/bin/activate
# 安装setuptools
RUN pip install setuptools
# 安装Python依赖
RUN pip install -r requirements.txt

View File

@ -19,8 +19,8 @@ from cryptoai.utils.config_loader import ConfigLoader
def main():
try:
print("程序启动")
# 设置每个整点运行一次
schedule.every().hour.do(CryptoAgent().start_agent)
# 设置每个4小时运行一次
schedule.every(4).hours.do(CryptoAgent().start_agent)
# 启动定时任务
while True: