0xironclad / 0xironclad/Task-Scheduler-API
GET /tasks/upcoming
- Lingua principale
- TypeScript
- Stelle
- 0
- Fork
- 2
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Cerca le route delle attività esistenti nella codebase, probabilmente in una directory routes/ o controllers/. Il nuovo endpoint GET /tasks/upcoming deve essere aggiunto lì, interrogando la tabella tasks con i filtri descritti (status='pending', run_at all'interno della finestra). Controlla come altri endpoint gestiscono i parametri di query e le query al database per seguire i pattern del progetto. Testa eseguendo il server e chiamando l'endpoint con diversi valori di window.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- express, nodejs, postgresql, typescript
- Ambito
- api, backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 70/100