0xironclad / 0xironclad/Task-Scheduler-API
GET /tasks/upcoming
- 主要語言
- TypeScript
- 星號
- 0
- 分支
- 2
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Expose an endpoint that returns tasks scheduled to run soon, based on a future time window.
What to implement:
New route: GET /tasks/upcoming
Query params:
window (minutes, default 60)
limit, offset (optional)
Return tasks where:
status = 'pending' & run_at is between NOW() and NOW() + interval 'window minutes'
Order results by run_at ascending.
About the window parameter
window defines how far into the future to look.
Example:
GET /tasks/upcoming?window=30 , This returns pending tasks scheduled in the next 30 minutes.
DB logic:
Select tasks where:
status = 'pending'
run_at is between NOW() and NOW() + interval 'window minutes'
Order by run_at ascending
Expected result
A filtered, chronological array of upcoming tasks.
Empty array if nothing is scheduled in the window.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
在程式碼庫中尋找現有的任務路由,可能在 routes/ 或 controllers/ 目錄中。需要在那裡新增 GET /tasks/upcoming 端點,使用描述的過濾器(status='pending',run_at 在時間範圍內)查詢 tasks 資料表。檢查其他端點如何處理查詢參數和資料庫查詢,以遵循專案的模式。透過執行伺服器並使用不同的 window 值呼叫端點進行測試。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- express, nodejs, postgresql
- 領域
- api, backend
- Issue 類型
- 功能
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 70/100