|
1 | 1 | # Webhook Timer |
2 | 2 |
|
3 | | -A minimalistic timer for webhooks, designed specifically for N8N Webhooks. |
4 | | - |
5 | | -## Features |
6 | | -- Minimalistic Go-based daemon |
7 | | -- SQLite persistence for configuration |
8 | | -- Web-UI for managing timers |
9 | | -- Support for Fixed and Random intervals |
10 | | -- WebSocket for live countdown updates |
11 | | -- Ultra-lightweight Docker Image (~26MB) |
12 | | - |
13 | | -## ⚠️ AI GENERATED PROJECT ⚠️ |
14 | | - |
15 | | -> [!WARNING] |
16 | | -> This project was **100% generated by AI** and is **not actively maintained**. Use it at your own risk. |
17 | | -
|
18 | | -## Deployment |
19 | | - |
20 | | -### Docker Compose |
21 | | -```yaml |
22 | | -services: |
23 | | - timerhook: |
24 | | - image: ghcr.io/xhyperdevx/webhooktimer:latest |
25 | | - ports: |
26 | | - - "8080:8080" |
27 | | - volumes: |
28 | | - - ./data:/data |
29 | | - restart: unless-stopped |
| 3 | +A tiny 24/7 webhook scheduler with a minimal web UI. |
| 4 | + |
| 5 | +## What this rebuild includes |
| 6 | + |
| 7 | +- Extremely simple UI (single page, no frontend dependencies) |
| 8 | +- Fixed or random intervals |
| 9 | +- Sleep window (no executions during configured quiet time) |
| 10 | +- Per-entry enable/disable |
| 11 | +- Live countdown to next execution |
| 12 | +- Last execution status and timestamp |
| 13 | +- Per-entry execution log (last 10) |
| 14 | +- **Run now** button with immediate success/error feedback |
| 15 | +- Atomic JSON state persistence (new format, old DB files are intentionally not reused) |
| 16 | + |
| 17 | +## Why it is lightweight |
| 18 | + |
| 19 | +- Pure Go + standard library only |
| 20 | +- No JS framework, no CSS framework, no websocket dependency |
| 21 | +- Static binary in a `scratch` container image |
| 22 | + |
| 23 | +## Run locally |
| 24 | + |
| 25 | +```bash |
| 26 | +go run . |
30 | 27 | ``` |
31 | 28 |
|
32 | | -## Local Development |
33 | | -1. Install Go 1.23+ |
34 | | -2. `go run main.go` |
35 | | -3. Access UI at `http://localhost:8080` |
| 29 | +Open: `http://localhost:8080` |
| 30 | + |
| 31 | +## Docker |
| 32 | + |
| 33 | +```bash |
| 34 | +docker compose up --build |
| 35 | +``` |
| 36 | + |
| 37 | +### Environment variables |
| 38 | + |
| 39 | +- `PORT` (default `8080`) |
| 40 | +- `STATE_PATH` (default `/data/state.json`) |
| 41 | +- `TZ` (default `UTC`, used for sleep window calculations) |
| 42 | + |
| 43 | +## API (used by the UI) |
| 44 | + |
| 45 | +- `GET /api/entries` |
| 46 | +- `POST /api/entries` |
| 47 | +- `PUT /api/entries/{id}` |
| 48 | +- `DELETE /api/entries/{id}` |
| 49 | +- `POST /api/entries/{id}/toggle` |
| 50 | +- `POST /api/entries/{id}/execute` |
| 51 | +- `GET /api/entries/{id}/logs` |
| 52 | + |
| 53 | +## Notes |
| 54 | + |
| 55 | +- The new persistence format is JSON, not SQLite. |
| 56 | +- If an old database exists from previous versions, it is ignored by design. |
0 commit comments