YouTube Board

youtube.videos.duration

scheduler disabled local polling disabled active command ready read-only not due now
Modern command
youtube:videos:duration
Legacy command
/usr/bin/php /home/urtube/maint/get_duration.php
Schedule
*/23 * * * *
每 23 分鐘
Evaluation time
2026-05-26 09:55:00 Asia/Taipei
External dependency
Local DB
Write targets
none by default; manual local-only `--execute` updates duration queue rows
Notes
Legacy 從 `urt_video_duration` queue 挑 `mtime/duration/stime` 皆為 NULL 的 row,先把 `stime` 推到未來,再呼叫 YouTube `videos.list(contentDetails)` 並更新 `duration/caption`。Modern command 預設仍只列出 queue candidates 和 missing queue diagnostics;manual local-only `--execute --videoId/--limit` 會檢查 `YOUTUBE_API_KEY` 後限量呼叫 YouTube,transactionally/idempotently 更新本機 `urt_video_duration`。需要補 queue row 時必須額外明確傳 `--enqueue-missing`。Scheduler 不傳 `--execute`,仍是 dry-run。

Execution Guardrail

This job is read-only, active, command-ready, and allowed to execute when its cron expression is due. Scheduler execution still requires INGESTION_SCHEDULER_ENABLED=true.

Scheduled Local Polling

Scheduler-enabled local polling is blocked for this job until every explicit gate is satisfied.

  • INGESTION_LOCAL_POLLING_ENABLED is false.
  • Job key is not in INGESTION_SCHEDULED_WRITE_ALLOWLIST.
  • Production polling is not explicitly enabled.

youtube:videos:duration --execute --limit=1

Safe Commands

php artisan ingestion:run --job=youtube.videos.duration --at="2026-05-26 09:55:00" INGESTION_SCHEDULER_ENABLED=true php artisan ingestion:run --execute --job=youtube.videos.duration INGESTION_SCHEDULER_ENABLED=true INGESTION_LOCAL_POLLING_ENABLED=true INGESTION_SCHEDULED_WRITE_ALLOWLIST=youtube.videos.duration php artisan ingestion:run --execute --job=youtube.videos.duration

Next Runs

*/23 * * * *

  • 2026-05-26 10:00:00 CST
  • 2026-05-26 10:23:00 CST
  • 2026-05-26 10:46:00 CST
  • 2026-05-26 11:00:00 CST
  • 2026-05-26 11:23:00 CST