這些 gates 只描述目前 web request。Dokploy scheduled task 可以在單次 CLI process 注入獨立 env flag,不必讓一般 web traffic 啟用 polling。
No external ingestion:run --execute --record run file has been observed.
php artisan ingestion:run
Execute mode 只會在這次 request 暫時啟用 local runner。Local write polling 仍需要 INGESTION_LOCAL_POLLING_ENABLED=true、allowlisted job key,以及各 job 的 capped scheduled execute command。
| Created | Mode | Job | Evaluated | Due | Executed | Skipped | Failed | File |
|---|---|---|---|---|---|---|---|---|
| 2026-05-29 02:08:27 Asia/Taipei | execute |
ai.daily
|
1 | 1 | 1 | 0 | 0 |
ingestion-runs/20260529-020827-17147f96-0a06-46cd-b573-6788fc0110b9.json
|
| 2026-05-29 02:06:38 Asia/Taipei | execute |
ai.daily
|
1 | 0 | 0 | 1 | 0 |
ingestion-runs/20260529-020638-ee2a460b-8ad4-4d9d-9a56-3658d1615d12.json
|
| 2026-05-29 02:03:51 Asia/Taipei | dry-run |
ai.daily
|
1 | 0 | 0 | 1 | 0 |
ingestion-runs/20260529-020351-5100bcb0-9eaa-45e5-8a19-3a8e5bf67645.json
|
| 2026-05-29 02:03:39 Asia/Taipei | dry-run |
ai.daily
|
1 | 0 | 0 | 1 | 0 |
ingestion-runs/20260529-020339-6b07f270-a290-4747-805f-ea16cdc80118.json
|
| 2026-05-29 02:02:53 Asia/Taipei | dry-run |
reports.mayor.static
|
1 | 0 | 0 | 1 | 0 |
ingestion-runs/20260529-020253-9e188d26-9f76-4c31-a600-615a2f78c78a.json
|
| Priority | Status | Modern command | Command state | Legacy command | Schedule | Dependency | Writes | Notes |
|---|---|---|---|---|---|---|---|---|
| 1 | active |
youtube:live:cleanup
youtube.live.cleanup
detail / next runs
|
ready | /usr/bin/php /home/urtube/maint/unlist_live.php |
27 */2 * * *
每 2 小時第 27 分
|
Local DB |
preview mode; scheduled/local
--execute marks stale urt_video_live.del_flag=1
|
Legacy 會把過久未更新、尚未結束且排程時間已過的 urt_video_live row 設為 del_flag=1;modern command 的 preview mode 會列出 would-mark rows。Explicit/scheduled --execute 會限量更新本機 del_flag;這個 cleanup job 使用本地資料。 |
| 1 | active |
youtube:live:poll
youtube.live.poll
detail / next runs
|
ready | /usr/bin/php /home/urtube/maint/get_live.php |
* * * * *
每分鐘
|
Local DB |
dashboard-safe live polling preview; scheduled/local
--execute updates live rows and live logs
|
Legacy 從 urt_video_live 挑 mtime 超過 interval、尚未結束、排程時間已到且未刪除的直播 row;少於 10 筆且未指定 videoId 時會直接離開,否則呼叫 YouTube videos.list(liveStreamingDetails) 更新 urt_video_live 並 upsert urt_video_live_log.log_json。Modern command 的 preview mode 會列出 would-poll rows;explicit/scheduled --execute --videoId/--limit 會檢查 YOUTUBE_API_KEY 後限量呼叫 YouTube,transactionally 更新本機 urt_video_live 與 urt_video_live_log。Scheduler 在 write allowlist 開啟時使用 scheduled execute command;未開啟時維持 preview mode。 |
| 1 | active |
youtube:tvbs:live:poll
youtube.tvbs.live.poll
detail / next runs
|
ready | /usr/bin/php /home/urtube/maint/get_live_tvbs.php |
* * * * *
每分鐘 ingestion preview;legacy file 本身是 while(1) + sleep(30),未列在目前 cron snapshot
|
Local DB |
preview mode; scheduled/local
--execute updates urt_video_live_tvbs and urt_video_live_log_tvbs
|
Legacy TVBS poller 從 urt_video_live_tvbs 挑 mtime 超過硬編碼 40 秒、尚未結束、排程時間已到且未刪除的直播 row,呼叫 YouTube videos.list(liveStreamingDetails) 後更新 urt_video_live_tvbs 並 upsert urt_video_live_log_tvbs.log_json。這支是 standalone while-loop,未列在目前 production crontab;Modern command 的 preview mode 會列出 would-poll rows;manual/scheduled --execute --videoId/--limit 會檢查 YOUTUBE_API_KEY 後限量呼叫 YouTube,transactionally 更新本機 urt_video_live_tvbs 與 urt_video_live_log_tvbs。Scheduler 在 write allowlist 開啟時使用 capped scheduled execute command;未開啟時維持 preview mode。videoId branch 在 legacy source 意外查 urt_video_live,modern implementation 保持 TVBS table scope 並記錄 compatibility note。 |
| Priority | Status | Modern command | Command state | Legacy command | Schedule | Dependency | Writes | Notes |
|---|---|---|---|---|---|---|---|---|
| 1 | active |
reports:live:build
reports.live.build
detail / next runs
|
ready | /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 |
reports:live:clean
reports.live.clean
detail / next runs
|
ready | /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 |
reports:live:show
reports.live.show
detail / next runs
|
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 |
reports:live:static
reports.live.static
detail / next runs
|
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 | Modern command | Command state | Legacy command | Schedule | Dependency | Writes | Notes |
|---|---|---|---|---|---|---|---|---|
| 2 | active |
youtube:channels:videos
youtube.channels.videos.general
detail / next runs
|
ready | /usr/bin/php /home/urtube/maint/get_video.php |
*/5 * * * *
每 5 分鐘
|
Local DB |
preview mode; scheduled/local
--execute inserts videos/schedules/live rows
|
Legacy 會挑 urt_channel.vtime 到期或 NULL 的頻道,先把 vtime 推到一小時後,再呼叫 YouTube playlistItems.list(snippet) 抓 uploads playlist,insert urt_video、urt_video_schedule,live/upcoming 時 insert urt_video_live,最後依近七天影片數估算下一次 vtime。Modern command 的 preview mode 會列出 would-fetch channels 和本地估算;explicit/scheduled --execute --id/--channel --limit --max-results 會檢查 YOUTUBE_API_KEY 後限量呼叫 YouTube,idempotently upsert 本機 urt_video、urt_video_schedule、urt_video_live 並更新 urt_channel.vtime。Scheduler 在 write allowlist 開啟時使用 scheduled execute command;單一 playlist API 失敗會跳過該 channel 並延後重試,避免整個 job 卡死。 |
| 2 | active |
youtube:channels:videos --live=1 --force=3
youtube.channels.videos.live
detail / next runs
|
ready | /usr/bin/php /home/urtube/maint/get_video.php live=1 force=3 |
5 2-16 * * *
02-16 點每小時第 5 分
|
Local DB |
preview mode; scheduled/local
--execute inserts videos/schedules/live rows
|
Legacy 會從 urt_count.tags 找 [52] 直播頻道,呼叫 YouTube playlistItems.list(snippet) 抓 uploads playlist,insert urt_video、urt_video_schedule,並在 live/upcoming 時 insert urt_video_live。Modern command 的 preview mode 會列出 would-fetch channels;explicit/scheduled --execute --id/--channel --limit --max-results 會檢查 YOUTUBE_API_KEY 後限量呼叫 YouTube,idempotently upsert 本機 urt_video、urt_video_schedule、urt_video_live 並更新 urt_channel.vtime。Scheduler 在 write allowlist 開啟時使用 scheduled execute command;未開啟時維持 preview mode。 |
| 2 | active |
youtube:channels:videos --live=2 --force=3
youtube.channels.videos.live_group
detail / next runs
|
ready | /usr/bin/php /home/urtube/maint/get_video.php live=2 force=3 |
1,31 0-15 * * *
00-15 點每小時第 1、31 分
|
Local DB |
preview mode; scheduled/local
--execute inserts videos/schedules/live rows
|
Legacy 會從 urt_count.tags 找 [89] 群組頻道,呼叫 YouTube playlistItems.list(snippet) 抓 uploads playlist,insert urt_video、urt_video_schedule,並在 live/upcoming 時 insert urt_video_live。Modern command 的 preview mode 會列出 would-fetch channels;explicit/scheduled --execute --id/--channel --limit --max-results 會檢查 YOUTUBE_API_KEY 後限量呼叫 YouTube,idempotently upsert 本機 urt_video、urt_video_schedule、urt_video_live 並更新 urt_channel.vtime。Scheduler 在 write allowlist 開啟時使用 scheduled execute command;未開啟時維持 preview mode。 |
| 2 | active |
youtube:tvbs:videos
youtube.tvbs.videos
detail / next runs
|
ready | /usr/bin/php /home/urtube/maint/get_video_tvbs.php |
*/5 * * * *
每 5 分鐘 ingestion preview;legacy file 本身是 while loop + sleep(300),未列在目前 cron snapshot
|
Local DB |
preview mode; scheduled/local
--execute inserts videos/schedules/TVBS live rows
|
Legacy TVBS discovery 從 urt_count.tags 找 [29] 頻道,逐一呼叫 YouTube playlistItems.list(snippet) 抓 uploads playlist,insert urt_video、urt_video_schedule,並在縮圖含 default_live.jpg 或 live/upcoming 時 insert urt_video_live_tvbs。這支是 standalone while-loop,未列在目前 production crontab;Modern command 的 preview mode 會列出 would-fetch channels;manual/scheduled --execute --id/--channel --limit --max-results 會檢查 YOUTUBE_API_KEY 後限量呼叫 YouTube,idempotently upsert 本機 urt_video / urt_video_schedule / urt_video_live_tvbs。Scheduler 在 write allowlist 開啟時使用 capped scheduled execute command;未開啟時維持 preview mode。 |
| Priority | Status | Modern command | Command state | Legacy command | Schedule | Dependency | Writes | Notes |
|---|---|---|---|---|---|---|---|---|
| 2 | active |
youtube:videos:stats
youtube.videos.stats
detail / next runs
|
ready | /usr/bin/php /home/urtube/maint/get_video_count.php |
*/7 0-17 * * *
00-17 點每 7 分鐘
|
Local DB |
preview mode; scheduled/local
--execute updates video stats/log rows
|
Legacy 從 urt_video_schedule 挑 stime 到期且 210 天內發布的影片,先把 stime 推到未來,再呼叫 YouTube videos.list(statistics) 並更新 urt_video、urt_video_schedule、urt_video_log、urt_video_log_history。Modern command 的 preview mode 會列出 would-refresh candidates;explicit/scheduled --execute --videoId/--limit 會檢查 YOUTUBE_API_KEY 後限量呼叫 YouTube,transactionally/idempotently upsert 本機 stats/log rows。Scheduler 在 write allowlist 開啟時使用 capped scheduled execute command;未開啟時維持 preview mode。 |
| 3 | active |
youtube:videos:duration
youtube.videos.duration
detail / next runs
|
ready | /usr/bin/php /home/urtube/maint/get_duration.php |
*/23 * * * *
每 23 分鐘
|
Local DB |
preview mode; scheduled/local
--execute updates duration queue rows
|
Legacy 從 urt_video_duration queue 挑 mtime/duration/stime 皆為 NULL 的 row,先把 stime 推到未來,再呼叫 YouTube videos.list(contentDetails) 並更新 duration/caption。Modern command 的 preview mode 會列出 queue candidates 和 missing queue diagnostics;explicit/scheduled --execute --videoId/--limit 會檢查 YOUTUBE_API_KEY 後限量呼叫 YouTube,transactionally/idempotently 更新本機 urt_video_duration。--enqueue-missing 可從既有本機 urt_video 補缺少 duration row 的影片;未指定 --videoId 時會補一批最近影片,讓 scheduler 不會因空 queue 而空跑。Scheduler 在 write allowlist 開啟時使用 capped scheduled execute command;未開啟時維持 preview mode。 |
| Priority | Status | Modern command | Command state | Legacy command | Schedule | Dependency | Writes | Notes |
|---|---|---|---|---|---|---|---|---|
| 2 | active |
youtube:channels:stats
youtube.channels.stats
detail / next runs
|
ready | /usr/bin/php /home/urtube/maint/get_statics.php |
*/9 * * * *
每 9 分鐘
|
Local DB |
preview mode; scheduled/local
--execute updates channel/count/log rows
|
Legacy 從 urt_channel 挑 stime 過期或 NULL 的頻道,23 點只補 NULL,先更新 urt_channel.stime,再呼叫 YouTube channels.list(statistics) 並更新 urt_log、urt_count、urt_channel。Modern command 的 preview mode 會列出 would-refresh channels;explicit/scheduled --execute --u_id/--channel --limit 會檢查 YOUTUBE_API_KEY 後限量呼叫 YouTube,transactionally/idempotently 更新本機 urt_channel、urt_count、urt_log。Scheduler 在 write allowlist 開啟時使用 capped scheduled execute command;未開啟時維持 preview mode。 |
| Priority | Status | Modern command | Command state | Legacy command | Schedule | Dependency | Writes | Notes |
|---|---|---|---|---|---|---|---|---|
| 3 | active |
reports:counts:build
reports.counts.build
detail / next runs
|
ready | /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 |
reports:groups:build
reports.groups.build
detail / next runs
|
ready | /usr/bin/php /home/urtube/maint/get_group.php |
27 3,8,11,13,18,23 * * *
每日 6 次
|
新文易數 tag.analysis.tw group API when allowlisted |
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 |
reports:keywords:build
reports.keywords.build
detail / next runs
|
ready | /usr/bin/php /home/urtube/maint/make_keyword.php |
27 3,8,11,13,18,23 * * *
每日 6 次
|
新文易數 tag.analysis.tw keyword API when allowlisted |
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 |
reports:keywords:cache
reports.keywords.cache
detail / next runs
|
ready | /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 |
reports:people:build
reports.people.build
detail / next runs
|
ready | /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 |
reports:schedule:build
reports.schedule.build
detail / next runs
|
ready | /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 |
reports:tag-cloud:build
reports.tag_cloud.build
detail / next runs
|
ready | /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 |
reports:tag-date:build
reports.tag_date.build
detail / next runs
|
ready | /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 | Modern command | Command state | Legacy command | Schedule | Dependency | Writes | Notes |
|---|---|---|---|---|---|---|---|---|
| 4 | active |
ai:daily
ai.daily
detail / next runs
|
ready | /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 先用較小 --channel-limit=3 分批刷新,避免上游 AI timeout 長時間卡住整個 production scheduler;local/production polling、allowlist gates 通過後才使用 capped execute command。 |
| 4 | active |
ai:hourly
ai.hourly
detail / next runs
|
ready | /usr/bin/php /home/urtube/prompt/ai_hour_prompt.php do=1 |
10 0-15 * * *
00-15 點每小時第 10 分
|
Local DB |
preview mode; explicit
--execute calls OpenCode-compatible chat completions and upserts urt_ai_hour
|
Legacy 在每小時第 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。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。 |
| Priority | Status | Modern command | Command state | Legacy command | Schedule | Dependency | Writes | Notes |
|---|---|---|---|---|---|---|---|---|
| 4 | active |
reports:mayor:static
reports.mayor.static
detail / next runs
|
ready | /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 |
reports:static:build
reports.static.html
detail / next runs
|
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 承接。 |
| Priority | Status | Modern command | Command state | Legacy command | Schedule | Dependency | Writes | Notes |
|---|---|---|---|---|---|---|---|---|
| 5 | active |
youtube:comments:fetch
youtube.comments.fetch
detail / next runs
|
ready | /usr/bin/php /home/urtube/maint/do_comments.php |
5 * * * *
每小時第 5 分
|
Local DB; YouTube Data API commentThreads.list only with explicit/scheduled `--execute` |
preview mode; scheduled/local
--execute updates comments/authors/revisions and moves queue rows
|
Legacy 逐筆讀 urt_comment_queue,先更新 stime,呼叫 maint/get_comment.php videoId=... 抓 YouTube commentThreads.list 並更新 urt_comment / urt_comment_author / urt_comment_rev,再更新 ftime、copy 到 urt_comment_queue_done、delete queue row。Production crontab 只在每小時第 5 分排程。Modern command 的 preview mode 會列出 would-drain rows 和三小時快取判斷;explicit/scheduled --execute --videoId/--limit --max-pages 會檢查 YOUTUBE_API_KEY 後限量呼叫 YouTube,transactionally 更新本機 comment/author/revision tables 並搬移 queue row。Scheduler 在 write allowlist 開啟時用 capped execute command 消化 queue。 |
| 5 | active |
youtube:comments:queue --or=1,2,3,4,5,6,13,14,81 --hours=72 --min=500
youtube.comments.queue
detail / next runs
|
ready | /usr/bin/php /home/urtube/maint/make_comments.php or=1,2,3,4,5,6,13,14,81 hours=72 min=500 |
23 4,10,16 * * *
04、10、16 點第 23 分
|
Local DB |
preview mode; scheduled/local
--execute inserts urt_comment_queue
|
Legacy 會用 urt_count.tags 篩頻道,再找 urt_video.publishedAt 在指定 hours 內且 viewCount/commentCount 都超過 min 的影片,若不在 urt_comment_queue 就 insert queue row。Production crontab 使用 hours=72 min=500 且只在 04/10/16 點第 23 分排程。Modern command 的 preview mode 會列出 would-queue videos;explicit/scheduled --execute --limit 會 idempotently 插入本機 urt_comment_queue。Scheduler 在 write allowlist 開啟時用 capped execute command 補 queue rows。 |