Skip to content

Commit 71ab678

Browse files
committed
docs: enhance README with clearer features and usage examples
1 parent 4b8dd46 commit 71ab678

File tree

1 file changed

+80
-24
lines changed

1 file changed

+80
-24
lines changed

README.md

Lines changed: 80 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,111 @@
11
# Schedy
22

3-
Lightweight HTTP-based task scheduler that lets you schedule and execute tasks at specified times.
3+
> **A self-hostable, ultra-lightweight HTTP task scheduler for the weird and wonderful automation you want.**
4+
5+
Schedy lets you schedule HTTP POST requests to any endpoint at any time, with custom headers and payloads. Perfect for webhooks, bots, reminders, integrations, and all sorts of automation—without the bloat.
6+
7+
---
48

59
## Features
610

7-
- Schedule tasks via HTTP API
8-
- Executes tasks at the right time using Go routines and timers
9-
- Simple and easy to integrate
11+
- 🕒 **Schedule HTTP tasks** for any time in the future
12+
- 🪶 **Ultra-lightweight**: single binary, no external dependencies except BadgerDB
13+
- 🏠 **Self-hostable**: run anywhere Go runs (Linux, macOS, Windows, ARM, x86)
14+
- 🔒 **Custom headers**: add auth, content-type, or anything else
15+
- 🧬 **Flexible payloads**: send JSON, form data, or plain text
16+
- 🦄 **Weirdly simple**: no UI, no cron, just HTTP
1017

11-
## Getting Started
18+
---
1219

13-
### Prerequisites
20+
## Quick Start
1421

15-
- Go 1.18+ installed
22+
### 1. Download the Binary
1623

17-
### Installation
24+
Head to [Releases](https://github.com/ksamirdev/schedy/releases) and grab the latest `schedy` binary for your OS/architecture. No build required!
25+
26+
### 2. Run
1827

1928
```bash
20-
git clone https://github.com/ksamirdev/schedy.git
21-
cd schedy
22-
go build -o schedy cmd/schedy/main.go
29+
./schedy
2330
```
2431

25-
### Usage
32+
Schedy will listen on `:8080` by default.
2633

27-
Start the scheduler server:
34+
---
35+
36+
## API
37+
38+
### Schedule a Task
39+
40+
Send a POST to `/tasks`:
2841

2942
```bash
30-
./schedy
43+
curl -X POST http://localhost:8080/tasks \
44+
-H "Content-Type: application/json" \
45+
-d '{
46+
"execute_at": "2025-05-26T15:00:00Z",
47+
"url": "https://webhook.site/your-endpoint",
48+
"headers": {"Content-Type": "application/x-www-form-urlencoded", "Authorization": "Bearer TOKEN"},
49+
"payload": "foo=bar&baz=qux"
50+
}'
3151
```
3252

33-
### API Endpoints
53+
#### Request Fields
54+
- `execute_at`: When to run (RFC3339, UTC)
55+
- `url`: Where to POST
56+
- `headers`: (optional) Map of HTTP headers
57+
- `payload`: (optional) Anything: JSON, string, bytes, form data, etc.
3458

35-
- `POST /tasks` — Schedule a new task
59+
#### Examples
3660

37-
### Example
61+
**JSON payload (default):**
62+
```bash
63+
curl -X POST http://localhost:8080/tasks \
64+
-H "Content-Type: application/json" \
65+
-d '{
66+
"execute_at": "2025-05-26T15:00:00Z",
67+
"url": "https://example.com/webhook",
68+
"payload": {"hello": "world"}
69+
}'
70+
```
3871

39-
Schedule a task:
72+
**Form data:**
73+
```bash
74+
curl -X POST http://localhost:8080/tasks \
75+
-H "Content-Type: application/json" \
76+
-d '{
77+
"execute_at": "2025-05-26T15:00:00Z",
78+
"url": "https://example.com/form",
79+
"headers": {"Content-Type": "application/x-www-form-urlencoded"},
80+
"payload": "foo=bar&baz=qux"
81+
}'
82+
```
4083

84+
**Plain text:**
4185
```bash
42-
curl -X POST http://localhost:8080/tasks -d '{"execute_at":"2025-05-26T15:00:00Z","url":"https://webhook.site/8a741093-35cc-4085-9c0d-1e7f0c98ef9c", "payload": {"key": "value"}}' -H "Content-Type: application/json"
86+
curl -X POST http://localhost:8080/tasks \
87+
-H "Content-Type: application/json" \
88+
-d '{
89+
"execute_at": "2025-05-26T15:00:00Z",
90+
"url": "https://example.com/text",
91+
"headers": {"Content-Type": "text/plain"},
92+
"payload": "hello world!"
93+
}'
4394
```
4495

45-
## Contributing
96+
---
97+
98+
## Why Schedy?
99+
- No cron, no YAML, no UI, no cloud lock-in
100+
- Just HTTP, just works
101+
- For hackers, tinkerers, and anyone who wants to automate the weird stuff
46102

47-
We welcome contributions! Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details.
103+
---
48104

49-
## Code of Conduct
105+
## Contributing
50106

51-
This project adheres to a [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
107+
PRs, issues, and weird use-cases welcome! See [CONTRIBUTING.md](CONTRIBUTING.md).
52108

53109
## License
54110

55-
MIT License. See [LICENSE](LICENSE) for details.
111+
MIT. See [LICENSE](LICENSE).

0 commit comments

Comments
 (0)