YouTube Board

youtube.videos.stats

scheduler disabled local polling disabled active command ready read-only not due now
Modern command
youtube:videos:stats
Legacy command
/usr/bin/php /home/urtube/maint/get_video_count.php
Schedule
*/7 0-17 * * *
00-17 點每 7 分鐘
Evaluation time
2026-05-26 10:54:32 Asia/Taipei
External dependency
Local DB
Write targets
none by default; manual local-only `--execute` updates video stats/log rows
Notes
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 預設仍只列出 would-refresh candidates;manual local-only `--execute --videoId/--limit` 會檢查 `YOUTUBE_API_KEY` 後限量呼叫 YouTube,transactionally/idempotently upsert 本機 stats/log rows。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:stats --execute --limit=1

Safe Commands

php artisan ingestion:run --job=youtube.videos.stats --at="2026-05-26 10:54:32" INGESTION_SCHEDULER_ENABLED=true php artisan ingestion:run --execute --job=youtube.videos.stats INGESTION_SCHEDULER_ENABLED=true INGESTION_LOCAL_POLLING_ENABLED=true INGESTION_SCHEDULED_WRITE_ALLOWLIST=youtube.videos.stats php artisan ingestion:run --execute --job=youtube.videos.stats

Next Runs

*/7 0-17 * * *

  • 2026-05-26 10:56:00 CST
  • 2026-05-26 11:00:00 CST
  • 2026-05-26 11:07:00 CST
  • 2026-05-26 11:14:00 CST
  • 2026-05-26 11:21:00 CST