🔄 Real-time Fetch Projects

Django Management Command + Cron

Guest
G
ℹ️ เกี่ยวกับ Real-time Fetch

ใช้ Django Management Command fetch_projects_realtime สำหรับดึงข้อมูลโครงการ e-GP สามารถใช้กับ Cron job สำหรับ scheduling ตามเวลาทำงาน (09:00-12:00, 13:00-16:00)

📚 เอกสาร: Automation | Cron Setup Guide

📝 Form

ระบุ Project ID เดียว

ระบุหลาย Project IDs คั่นด้วย comma

Browser ID ที่จะใช้ ⚠️ ไม่มี browser ที่ active

Role ID (default: S01)

Priv Status (default: 2)

⏰ Cron Setup Information

⚠️ ข้อจำกัด: Cron ไม่รองรับ interval น้อยกว่า 1 นาที (60 วินาที)

ตัวอย่าง Cron Entry:

# 09:00-12:00: ทุก 1 นาที
* 9-11 * * * cd /path/to/project && /path/to/venv/bin/python manage.py fetch_projects_realtime --project-ids 68129495238,68099218030 --skip-checks

# 13:00-16:00: ทุก 1 นาที
* 13-15 * * * cd /path/to/project && /path/to/venv/bin/python manage.py fetch_projects_realtime --project-ids 68129495238,68099218030 --skip-checks

📖 ดูรายละเอียดเพิ่มเติม: Cron Setup Guide