1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
| {
| "tasks": [
| {
| "name": "morning_data_update",
| "description": "早盘前数据更新(7:00)",
| "schedule": "0 7 * * 1-5",
| "command": "cd /Users/variya/.openclaw/workspace/projects/a-stock-advisor && /opt/homebrew/bin/python3 scripts/data_update.py >> logs/morning_data_update.log 2>&1",
| "enabled": true,
| "priority": "high",
| "resource_profile": "light",
| "dependencies": [],
| "timeout_minutes": 15,
| "on_failure": "retry",
| "max_retries": 2
| },
| {
| "name": "evening_data_update",
| "description": "收盘后数据更新(16:00)",
| "schedule": "0 16 * * 1-5",
| "command": "cd /Users/variya/.openclaw/workspace/projects/a-stock-advisor && /opt/homebrew/bin/python3 scripts/data_update.py >> logs/evening_data_update.log 2>&1",
| "enabled": true,
| "priority": "high",
| "resource_profile": "light",
| "dependencies": [],
| "timeout_minutes": 20,
| "on_failure": "retry",
| "max_retries": 2
| },
| {
| "name": "daily_selection_push",
| "description": "每日选股和推送(18:30)",
| "schedule": "30 18 * * 1-5",
| "command": "cd /Users/variya/.openclaw/workspace/projects/a-stock-advisor && /opt/homebrew/bin/python3 run_daily.py >> logs/daily_run.log 2>&1",
| "enabled": true,
| "priority": "critical",
| "resource_profile": "medium",
| "dependencies": ["evening_data_update"],
| "timeout_minutes": 30,
| "on_failure": "alert",
| "max_retries": 0
| },
| {
| "name": "health_check",
| "description": "系统健康检查(凌晨 3:00)",
| "schedule": "0 3 * * *",
| "command": "cd /Users/variya/.openclaw/workspace/projects/a-stock-advisor && /opt/homebrew/bin/python3 scripts/health_check.py >> logs/health_check.log 2>&1",
| "enabled": true,
| "priority": "medium",
| "resource_profile": "very_light",
| "dependencies": [],
| "timeout_minutes": 5,
| "on_failure": "log",
| "max_retries": 0
| },
| {
| "name": "monitor_collector",
| "description": "监控数据收集(每小时)",
| "schedule": "0 * * * *",
| "command": "cd /Users/variya/.openclaw/workspace/projects/a-stock-advisor && /opt/homebrew/bin/python3 scripts/monitor_collector.py >> logs/monitor_collector.log 2>&1",
| "enabled": true,
| "priority": "low",
| "resource_profile": "very_light",
| "dependencies": [],
| "timeout_minutes": 2,
| "on_failure": "log",
| "max_retries": 0
| },
| {
| "name": "weekly_backtest",
| "description": "周度策略回测(周日凌晨 2:00)",
| "schedule": "0 2 * * 0",
| "command": "cd /Users/variya/.openclaw/workspace/projects/a-stock-advisor && /opt/homebrew/bin/python3 scripts/run_backtest.py >> logs/backtest.log 2>&1",
| "enabled": true,
| "priority": "medium",
| "resource_profile": "heavy",
| "dependencies": [],
| "timeout_minutes": 120,
| "on_failure": "log",
| "max_retries": 0
| }
| ],
| "resource_profiles": {
| "very_light": {
| "max_cpu_percent": 5,
| "max_memory_mb": 256,
| "description": "极低负载,快速执行"
| },
| "light": {
| "max_cpu_percent": 25,
| "max_memory_mb": 512,
| "description": "低负载,IO密集型"
| },
| "medium": {
| "max_cpu_percent": 50,
| "max_memory_mb": 1024,
| "description": "中等负载,计算密集型"
| },
| "heavy": {
| "max_cpu_percent": 100,
| "max_memory_mb": 2048,
| "description": "高负载,长时间计算"
| }
| },
| "scheduling_constraints": {
| "max_concurrent_tasks": 2,
| "max_concurrent_heavy_tasks": 1,
| "min_interval_seconds": 300,
| "off_peak_hours": {
| "start": "23:00",
| "end": "07:00"
| }
| },
| "agent_intervention_rules": {
| "on_critical_failures": true,
| "on_degraded_performance": true,
| "on_data_anomalies": true,
| "on_security_events": false,
| "notification_channels": ["logs", "email"]
| },
| "version": "1.0.0",
| "last_updated": "2026-03-01T02:20:00Z",
| "notes": [
| "所有任务路径使用绝对路径以确保 cron 可靠执行",
| "日志统一输出到 logs/ 目录",
| "重试机制:数据更新失败自动重试,选股推送失败发出警报",
| "Agent 监控:仅在异常时介入,减少日常干扰"
| ]
| }
|
|