Skip to content

v0.0.7

Latest

Choose a tag to compare

@ksamirdev ksamirdev released this 24 Nov 11:42
· 3 commits to main since this release

What's New in v0.0.7

๐Ÿ—‘๏ธ Task Deletion & Management Endpoints

Added comprehensive task deletion and management capabilities to Schedy, addressing a critical operational need for managing scheduled tasks.

New HTTP Endpoints:

  • GET /tasks/{id} - Retrieve a single task by ID

    • Check task status and details before execution
    • Returns 404 if task doesn't exist
  • DELETE /tasks/{id} - Delete a specific task

    • Cancel mistakenly created or duplicated tasks
    • Returns 204 No Content on success, 404 if not found
  • DELETE /tasks - Bulk delete tasks with filters

    • url=<target-url> - Delete all tasks targeting a specific URL
    • before=<RFC3339-time> - Delete tasks scheduled before a time
    • after=<RFC3339-time> - Delete tasks scheduled after a time
    • Combine filters for precise control
    • Returns count of deleted tasks: {"deleted": N}

All new endpoints require X-API-Key authentication, maintaining security parity with existing endpoints.

๐Ÿ” Idempotency & Duplicate Protection

To prevent accidental duplicate scheduling:

  • Automatic duplicate detection for tasks with the same url + execute_at
  • Optional Idempotency-Key header supported
  • If a duplicate is detected:
    • The existing task is returned
    • No new task is created
    • Response code: 200 OK

Try the new version:

docker run -p 8080:8080 ghcr.io/ksamirdev/schedy:v0.0.7
# or
docker run -p 8080:8080 ksamirdev/schedy:v0.0.7

Example Usage:

# Delete a specific task
curl -X DELETE http://localhost:8080/tasks/{id} \
  -H "X-API-Key: your-key"

# Delete all tasks for a specific URL
curl -X DELETE "http://localhost:8080/tasks?url=http://example.com/webhook" \
  -H "X-API-Key: your-key"

# Delete tasks scheduled in the next hour
curl -X DELETE "http://localhost:8080/tasks?before=2025-11-24T10:00:00Z" \
  -H "X-API-Key: your-key"

# Idempotent task creation
curl -X POST http://localhost:8080/tasks \
  -H "Idempotency-Key: unique-123" \
  -H "X-API-Key: your-key" \
  -d '{"url":"http://example.com","execute_at":"2025-12-01T10:00:00Z"}'

Thanks to the community for requesting this feature! ๐Ÿ™

Full Changelog: v0.0.6...v0.0.7