追蹤用本機資料重建 dashboard cache、靜態報表替代頁、AI 摘要與其他 report builder 的排程或 request-driven 工作。
latest=2026-06-10 18:39:01 Asia/Taipei executed=2 failed=0
php artisan ingestion:run
| Priority | Status | Trigger | Modern command | Scheduled status | Legacy command | Schedule | Dependency | Writes | Notes |
|---|---|---|---|---|---|---|---|---|---|
| 1 | active ready | 排程可執行 |
reports:live:build
reports.live.build
detail / next runs
|
allowed
reports:live:build --execute --hours=24 --limit=100 |
/usr/bin/php /home/urtube/maint/make_live.php |
*/9 0-9,15,23 * * * / */19 10-14 * * *
依時段每 9 或 19 分鐘
|
Local DB |
preview mode; scheduled/local
--execute upserts urt_show_video_live display cache rows
|
Legacy make_live.php 會呼叫 YouTube API 補 urt_video / urt_video_live,show_live.php 會寫 urt_show_video_live cache;modern command 的 preview mode 是 display-cache ingestion preview,用本機 urt_video_live + urt_video 預覽會補哪些 display cache rows。Explicit/scheduled --execute upsert 本機 display cache;YouTube discovery/polling 由 youtube:channels:videos 與 youtube:live:poll 負責。 |
| 1 | active ready | 排程可執行 |
reports:live:clean
reports.live.clean
detail / next runs
|
allowed
reports:live:clean --execute --limit=500 |
/usr/bin/php /home/urtube/maint/clean_show_live.php |
33 3,13,23 * * *
03:33、13:33、23:33
|
Local DB |
preview mode; scheduled/local
--execute deletes invalid urt_show_live_tag_date cache rows
|
Legacy 會刪除 urt_show_live_tag_date 中 the_date 太接近 cache ctime 的 row;modern command 的 preview mode 列出 would-delete rows。Explicit/scheduled --execute 會限量刪除本機 cache rows。 |
| 1 | active ready | 排程預覽 / request 渲染 |
reports:live:show
reports.live.show
detail / next runs
|
preview ready | /usr/bin/php /home/urtube/maint/show_live.php |
*/7 * * * *
每 7 分鐘
|
Local DB |
dashboard-safe (live dashboard snapshot)
|
Legacy 會寫 urt_show_video_live cache;modern command 輸出本機 live dashboard snapshot,可作為 scheduler one-shot 驗證目標;display cache refresh 由 reports:live:build --execute 負責。 |
| 1 | active ready | 排程預覽 / request 渲染 |
reports:live:static
reports.live.static
detail / next runs
|
preview ready | /home/urtube/html/make_live.sh |
*/19 * * * *
每 19 分鐘
|
Local DB |
dashboard-safe (live static HTML ingestion preview)
|
Legacy 會執行 live.php or=1,2,12,13,14,81 > html/live_social.html;modern command 的 preview mode 會列出 would-generate target 並對應到 /live/current?or=1,2,12,13,14,81,靜態 HTML 輸出改由動態 Laravel route 承接。 |
| Priority | Status | Trigger | Modern command | Scheduled status | Legacy command | Schedule | Dependency | Writes | Notes |
|---|---|---|---|---|---|---|---|---|---|
| 3 | active ready | 排程可執行 |
reports:channel-cloud:build
reports.channel_cloud.build
detail / next runs
|
allowed
reports:channel-cloud:build --execute --days=1,3,7,30,90 --limit=50 --recent-days=14 --keyword-limit=5000 |
/usr/bin/php /home/urtube/api/cloud.php uid=... |
27 3,8,11,13,18,23 * * *
每日 6 次
|
Local DB |
preview mode; scheduled/local
--execute upserts urt_show_cloud cache rows
|
Modern command 的 preview mode 會列出會處理的 channel cloud period jobs。Explicit/scheduled --execute 會用本機 urt_video/tags 透過 ChannelCloudCacheBuilder 為指定或近期活躍頻道補 urt_show_cloud cache。 |
| 3 | active ready | 排程可執行 |
reports:counts:build
reports.counts.build
detail / next runs
|
allowed
reports:counts:build --execute --limit=500 |
/usr/bin/php /home/urtube/maint/make_count.php |
27 3,8,11,13,18,23 * * *
每日 6 次
|
Local DB |
preview mode; scheduled/local
--execute updates urt_count weekly/monthly delta columns
|
Legacy 會根據 urt_log.thedata update urt_count 的週/月 view/sub/video 增量與 mtime;modern command 的 preview mode 輸出本機 preview。Explicit/scheduled --execute 會限量更新本機 urt_count delta columns。 |
| 3 | active ready | 排程可執行 |
reports:groups:build
reports.groups.build
detail / next runs
|
allowed
reports:groups:build --execute --hours=22 --limit=100 |
/usr/bin/php /home/urtube/maint/get_group.php |
27 3,8,11,13,18,23 * * *
每日 6 次
|
新文易數 tag.analysis.tw group API when scheduled-write gates allow it |
preview mode; scheduled/local
--execute upserts local tag_group rows
|
Legacy maintenance 會呼叫新文易數 https://tag.analysis.tw/api/group.php?hours=...,再 insert/update tag_group;modern command 的 preview mode 彙整本機 tag_group 狀態。Explicit/scheduled --execute 會呼叫 external group API 並 upsert 本機 tag_group。 |
| 3 | active ready | 排程可執行 |
reports:keywords:build
reports.keywords.build
detail / next runs
|
allowed
reports:keywords:build --execute --hours=2 --limit=100 |
/usr/bin/php /home/urtube/maint/make_keyword.php |
27 3,8,11,13,18,23 * * *
每日 6 次
|
新文易數 tag.analysis.tw keyword API when scheduled-write gates allow it |
preview mode; scheduled/local
--execute upserts local tags rows
|
Legacy maintenance 會從新文易數 tag.analysis.tw 抓 tag JSON、更新 tags,再寫 data/keyword.json / data/keyword_all.json;modern command 的 preview mode 用本機 tags 預覽 keyword JSON。Explicit/scheduled --execute 會呼叫 tag.analysis.tw/api/tag_json.php 並 upsert 本機 tags;filesystem JSON 輸出改由 DB-backed cache 承接。 |
| 3 | active ready | 排程可執行 |
reports:keywords:cache
reports.keywords.cache
detail / next runs
|
allowed
reports:keywords:cache --execute --days=31 --recent-days=7 --keyword-limit=1000 |
/usr/bin/php /home/urtube/maint/tags_all.php |
27 3,8,11,13,18,23 * * *
每日 6 次
|
Local DB |
preview mode; scheduled/local
--execute upserts urt_show_data.tags_all keyword metric cache
|
Legacy 會從 urt_video 計算每個 keyword 的影片數、觀看數、成長等指標並寫入 urt_show_data.tags_all;modern command 的 preview mode 列出會處理的 keyword 數量。Explicit/scheduled --execute 會用本機資料透過 TagsAllCacheBuilder 補 keyword metric cache。 |
| 3 | active ready | 排程可執行 |
reports:people:build
reports.people.build
detail / next runs
|
allowed
reports:people:build --execute --limit=5 --days=37 --tagid=13 --keyword-limit=5000 |
/usr/bin/php /home/urtube/maint/make_people.php |
27 3,8,11,13,18,23 * * *
每日 6 次
|
Local DB |
preview mode; scheduled/local
--execute upserts people urt_show_tag_date cache rows
|
Legacy 從 tag_group 找 政治人物,逐一呼叫 api/tag_period.php tag=... tagid=13 days=37 產生 cache;modern command 的 preview mode 列出會處理的 tag period jobs。Explicit/scheduled --execute 會用本機 urt_video/urt_count/tags 透過 TagDateCacheBuilder 為選定人物補 urt_show_tag_date cache,改走 Laravel cache builder。 |
| 3 | active ready | 排程可執行 |
reports:schedule:build
reports.schedule.build
detail / next runs
|
allowed
reports:schedule:build --execute --limit=100 |
/usr/bin/php /home/urtube/maint/make_schedule.php |
29,47 * * * *
每小時第 29、47 分
|
Local DB |
preview mode; scheduled/local
--execute updates urt_video_schedule.stime/mtime
|
Legacy 讀最近更新的 urt_video_schedule,用 urt_video_log_history 最近兩筆觀看數估算下一次 stime,再更新 urt_video_schedule.stime/mtime;modern command 的 preview mode 輸出估算結果。Explicit/scheduled --execute 會限量更新本機 schedule rows。 |
| 3 | active ready | 排程可執行 |
reports:tag-cloud:build
reports.tag_cloud.build
detail / next runs
|
allowed
reports:tag-cloud:build --execute --days=1,3,7,30,90 --tagid=1,2,3,4,5,6,13,14,81 --keyword-limit=5000 |
/usr/bin/php /home/urtube/maint/make_tag_cloud.php |
27 3,8,11,13,18,23 * * *
每日 6 次
|
Local DB |
preview mode; scheduled/local
--execute upserts urt_show_tag_cloud cache rows
|
Legacy 會從 urt_video 重新計算並補寫 urt_show_tag_cloud;modern command 的 preview mode 列出會處理的 tag cloud period jobs。Explicit/scheduled --execute 會用本機 urt_video/urt_count/tags 透過 TagCloudCacheBuilder 為選定標籤與天數組合補 urt_show_tag_cloud cache。 |
| 3 | active ready | 排程可執行 |
reports:tag-date:build
reports.tag_date.build
detail / next runs
|
allowed
reports:tag-date:build --tagid=1 --days=30 --execute |
/usr/bin/php /home/urtube/maint/make_tag_date.php |
27 3,8,11,13,18,23 * * *
每日 6 次
|
Local DB |
preview mode; scheduled/local
--execute upserts urt_show_tag_date cache rows
|
Legacy 會依 tagid/or/not 組合,從 urt_video/urt_count/tags 計算逐日 keyword 觀看數/影片數/重要度並寫入 urt_show_tag_date;modern command 的 preview mode 列出會處理的 tag/date 組合。Explicit/scheduled --execute 會用本機資料透過 TagDateCacheBuilder 補 urt_show_tag_date cache。 |
| Priority | Status | Trigger | Modern command | Scheduled status | Legacy command | Schedule | Dependency | Writes | Notes |
|---|---|---|---|---|---|---|---|---|---|
| 4 | active ready | 排程可執行 |
ai:daily
ai.daily
detail / next runs
|
allowed
ai:daily --execute --channel-limit=39 --channel-batch-size=12 --ai-call-limit=45 --channel-video-limit=120 --limit=1000 |
/home/urtube/maint/make_ai_day.sh |
15 16 * * *
每日 16:15
|
Local DB |
preview mode; explicit
--execute calls OpenCode-compatible chat completions and upserts urt_channel_ai / urt_ai_date
|
Legacy 先執行 make_channel_ai.php,對硬編碼 39 個頻道逐一用當日 urt_video raw rows 產生 prompt,影片數少於 10 就跳過,AI 回應後 insert urt_channel_ai;再用 get_ai_day.php condition=all/green/blue/neutral/finance/world 讀 urt_channel_ai.result_json,依 urt_count.tags 套用 condition filters,合併媒體事件 prompt,呼叫 AI 後 insert urt_ai_date.channel_id/result_json。Modern command 的 preview mode 會預覽;explicit --execute 會用 OpenCode-compatible chat completions,idempotently upsert 本機 urt_channel_ai 與 urt_ai_date。Scheduler scheduled write 會跑滿 39 個設定頻道、以 --channel-batch-size=12 分批刷新,並用 --ai-call-limit=45 與 --channel-video-limit=120 控制 AI call/prompt 成本;local/production polling、allowlist gates 通過後才使用 capped execute command。 |
| 4 | planned ready | 使用者請求才執行 |
ai:days:refresh
ai.days_refresh
detail / next runs
|
request gated | operator-run make_ai_day.sh + ai_event_prompt.php + ai_cont_prompt.php sequence |
manual
手動維護;指定 --from/--to 後一次跑 daily/event/period/verify pipeline
|
Local DB |
preview mode; explicit
--execute orchestrates ai:daily, missing-only ai:event, ai:period, and final missing-row verification
|
用來取代人工逐步補 6/2、6/3 這類 AI daily/event/period chain 的操作。Dry-run 會列出每一天 daily aggregate、event missing rows 與相鄰 period matching 計畫;execute mode 先重生 daily aggregate,再以每個 event 的小批次 missing-only 補 urt_ai_event summary/people/media,接著寫入相鄰日 urt_ai_period,最後重新 preview 驗證 missing=0。預設 --daily-channel-limit=0,因此不會順手刷新 39 個 channel AI;若要完整日更需明確傳 --daily-channel-limit=39 --daily-channel-batch-size=12 並經 production allowlist 控制。 |
| 4 | planned ready | 使用者請求才執行 |
ai:event
ai.event
detail / next runs
|
request gated | /usr/bin/php /home/urtube/prompt/ai_event_prompt.php do=1 |
manual
手動維護;先產生 urt_ai_date daily topics 後再執行
|
Local DB |
preview mode; explicit
--execute calls OpenCode-compatible chat completions and upserts urt_ai_event summary/people/media rows
|
Legacy event workflow 會針對一個 daily topic 呼叫 summary、people、media prompt,把事件摘要、人物立場與媒體立場寫入 urt_ai_event。Modern ai:event 重用 AiDailyReport 目前可顯示的 topic resolver,因此支援 date-mode 一次補整天,也支援 --aipk --event 補舊 event URL;explicit --execute 會依 aipk/event/prompt_type idempotently upsert urt_ai_event,並用 --ai-call-limit 控制 production AI 寫入面。暫不排入 scheduler。 |
| 4 | active ready | 排程可執行 |
ai:hourly
ai.hourly
detail / next runs
|
allowed
ai:hourly --execute --limit=20 |
/usr/bin/php /home/urtube/prompt/ai_hour_prompt.php do=1 |
10 * * * *
每小時第 10 分
|
Local DB |
preview mode; explicit
--execute calls OpenCode-compatible chat completions and upserts urt_ai_hour
|
每小時第 10 分用 ai_hour_prompt.php do=1 對應流程抓上一個完整小時的 urt_video,套用 condition/tag filters,呼叫 AI 後 insert urt_ai_hour 且 data_type=each;modern command 的 preview mode 會預覽影片候選、prompt bounds、既有 hourly row,並支援 --at 針對指定時點補跑。Explicit --execute 會檢查 OpenCode-compatible key、呼叫 chat completions,並以 date window / condition / model / data_type / user_token idempotently upsert urt_ai_hour。Scheduler scheduled write 只在 scheduler、local/production polling、allowlist gates 通過後使用 capped execute command。 |
| 4 | active ready | 排程可執行 |
ai:mayor-person
ai.mayor_person
detail / next runs
|
allowed
ai:mayor-person --execute --city=taipei --limit=10 --ai-call-limit=10 |
new Laravel mayor candidate daily AI dashboard |
45 5,20 * * *
每日 05:45 產生早報,20:45 在資料更完整後覆寫同一日期報告;先由台北市候選人日報開始,可用 --city/--person 手動補跑
|
Local DB |
preview mode; explicit/scheduled
--execute calls OpenCode-compatible chat completions and upserts urt_mayor_person_ai
|
本 job 讀 mayor candidate 固定清單、urt_show_tag_date、urt_show_video_tag_date 與 urt_video,產生每位候選人的每日 Dashboard prompt;execute mode 用 OpenCode-compatible chat completions 產生「今日發生什麼、調整事項、今日行動」JSON,idempotently upsert urt_mayor_person_ai。頁面 request 只讀 cache,不直接呼叫 AI。Production scheduled execute 仍受 scheduler/local-production polling/allowlist gates 控制;手動補跑可用 ai:mayor-person --execute --city=taipei --person=蔣萬安,沈伯洋 --date=YYYY-MM-DD --ai-call-limit=2。 |
| 4 | planned ready | 使用者請求才執行 |
ai:period
ai.period
detail / next runs
|
request gated | /usr/bin/php /home/urtube/prompt/ai_cont_prompt.php do=1 |
manual
手動維護;先產生相鄰兩天 urt_ai_date 後再執行
|
Local DB |
preview mode; explicit
--execute calls OpenCode-compatible chat completions and upserts urt_ai_period
|
Legacy continuous-period workflow 會比較相鄰兩天 AI daily 主題,把其實同一條事件線的不同標題寫入 urt_ai_period.result_json,並在 data_json 保存 from/to urt_ai_date.pk。Modern ai:period 先用 AiDailyReport 取得兩天可顯示 topics,因此能支援 daily result_json 空值時的 channel AI fallback;explicit --execute 只打一個 AI matching call 並 idempotently upsert urt_ai_period。目前不設 scheduled execute command,避免未審核前自動擴大 production AI 寫入面。 |
| Priority | Status | Trigger | Modern command | Scheduled status | Legacy command | Schedule | Dependency | Writes | Notes |
|---|---|---|---|---|---|---|---|---|---|
| 4 | active ready | 排程可執行 |
reports:mayor:static
reports.mayor.static
detail / next runs
|
allowed
reports:mayor:static --execute --limit=5 --keyword-limit=5000 |
/home/urtube/mayor/make_mayor.sh |
13 */5 * * *
每 5 小時第 13 分 ingestion preview;目前 legacy cron snapshot 這行是註解狀態
|
Local DB |
preview mode; scheduled/local
--execute upserts mayor urt_show_tag_date cache rows
|
Legacy mayor/make_mayor.sh 會執行 mayor/city.php days=30 city=... 並覆寫 /home/urtube/mayor/html_*.html;modern command 的 preview mode 是 mayor static HTML ingestion preview,會列出 would-generate target 並對應到 /mayor/cities/{city}。Explicit/scheduled --execute 會用本機 urt_video/urt_count/tags 重建 mayor 需要的 urt_show_tag_date rows;靜態 HTML 輸出改由動態 Laravel route 承接。 |
| 4 | active ready | 排程預覽 / request 渲染 |
reports:static:build
reports.static.html
detail / next runs
|
preview ready | /home/urtube/html/make_html.sh |
13 8 * * *
每日 08:13
|
Local DB |
dashboard-safe (group static HTML ingestion preview)
|
Legacy 會執行 group_chart.php / group_line.php 並覆寫 html/group_*.html;modern command 的 preview mode 會列出 would-generate target 並對應到 /groups/{group}/ranking 或 /groups/{group}/trends,靜態 HTML 輸出改由動態 Laravel route 承接。 |