From 483f358972b8b0e38b50c93c68d4af7c87173d3b Mon Sep 17 00:00:00 2001 From: aaron <> Date: Tue, 29 Apr 2025 17:03:38 +0800 Subject: [PATCH] update --- cryptoai/config/config.yaml | 13 ++++++++----- cryptoai/main.py | 11 ++++++++--- docker-compose.yml | 2 +- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/cryptoai/config/config.yaml b/cryptoai/config/config.yaml index abd1052..000be85 100644 --- a/cryptoai/config/config.yaml +++ b/cryptoai/config/config.yaml @@ -25,11 +25,14 @@ alltick: # 加密货币设置 crypto: base_currencies: - # - "BTC" - # - "ETH" - # - "SOL" - # - "SUI" - - "CETUS" + - "BTC" + - "ETH" + - "SOL" + - "SUI" + - "DOGE" + - "XRP" + - "ADA" + # - "CETUS" quote_currency: "USDT" time_interval: "4h" # 可选: 1m, 5m, 15m, 30m, 1h, 4h, 1d historical_days: 30 diff --git a/cryptoai/main.py b/cryptoai/main.py index ed7a5e4..f363aaf 100644 --- a/cryptoai/main.py +++ b/cryptoai/main.py @@ -19,9 +19,14 @@ from cryptoai.utils.config_loader import ConfigLoader def main(): try: print("定时程序启动") - CryptoAgent().start_agent('BTCUSDT') - # 设置每个4小时运行一次 - schedule.every(4).hours.do(CryptoAgent().start_agent) + CryptoAgent().start_agent() + # 设置 00:00, 04:00, 08:00, 12:00, 16:00, 20:00 运行一次 + schedule.every().day.at("00:00").do(CryptoAgent().start_agent) + schedule.every().day.at("04:00").do(CryptoAgent().start_agent) + schedule.every().day.at("08:00").do(CryptoAgent().start_agent) + schedule.every().day.at("12:00").do(CryptoAgent().start_agent) + schedule.every().day.at("16:00").do(CryptoAgent().start_agent) + schedule.every().day.at("20:00").do(CryptoAgent().start_agent) # 启动定时任务 while True: diff --git a/docker-compose.yml b/docker-compose.yml index 7a899e2..bbe6490 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: context: . dockerfile: Dockerfile container_name: cryptoai - image: cryptoai:0.0.5 + image: cryptoai:0.0.6 restart: unless-stopped volumes: # 挂载配置文件