From 10bf82fb633249f9b1b7a54cc88984c32fef4e9a Mon Sep 17 00:00:00 2001 From: aaron <> Date: Sun, 4 May 2025 11:21:35 +0800 Subject: [PATCH] update --- cryptoai/monitor_endpoint.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/cryptoai/monitor_endpoint.py b/cryptoai/monitor_endpoint.py index 6093c39..c4b4a86 100644 --- a/cryptoai/monitor_endpoint.py +++ b/cryptoai/monitor_endpoint.py @@ -17,24 +17,20 @@ def run_monitor(): print("☕️ 加密货币监控程序已启动") # 5分钟监控,交易量增长 - times = [":00", ":05", ":10", ":15", ":20", ":25", ":30", ":35", ":40", ":45", ":50", ":55"] - for time in times: + for time in [":00", ":05", ":10", ":15", ":20", ":25", ":30", ":35", ":40", ":45", ":50", ":55"]: schedule.every().hour.at(time).do(volume_growup_monitor.run, time_interval="5m") # 15分钟监控,技术指标 - times = [":00", ":15", ":30", ":45"] - for time in times: + for time in [":00", ":15", ":30", ":45"]: schedule.every().hour.at(time).do(technical_indicators_monitor.run, time_interval="15m") # 每小时整点监控,技术指标 - times = ["00:00", "01:00", "02:00", "03:00", "04:00", "05:00", "06:00", "07:00", "08:00", "09:00", "10:00", "11:00", "12:00", "13:00", "14:00", "15:00", "16:00", "17:00", "18:00", "19:00", "20:00", "21:00", "22:00", "23:00"] - for time in times: - schedule.every().hour.at(time).do(technical_indicators_monitor.run, time_interval="1h") + for time in ["00:00", "01:00", "02:00", "03:00", "04:00", "05:00", "06:00", "07:00", "08:00", "09:00", "10:00", "11:00", "12:00", "13:00", "14:00", "15:00", "16:00", "17:00", "18:00", "19:00", "20:00", "21:00", "22:00", "23:00"]: + schedule.every().day.at(time).do(technical_indicators_monitor.run, time_interval="1h") # 4小时监控,技术指标 - times = ["00:00", "04:00", "08:00", "12:00", "16:00", "20:00"] - for time in times: + for time in ["00:00", "04:00", "08:00", "12:00", "16:00", "20:00"]: schedule.every().day.at(time).do(technical_indicators_monitor.run, time_interval="4h")