docs: update docs for cron, shortener, CI
Add !cron section to USAGE.md and CHEATSHEET.md. Mark cron, URL shortener, CI complete in ROADMAP.md and TODO.md. New sprint in TASKS.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -437,6 +437,18 @@ History in `data/alert_history.db`.
|
||||
|
||||
Shows top 3 results as `Title -- URL`. Channel only. Max query length: 200 chars.
|
||||
|
||||
## Cron (admin)
|
||||
|
||||
```
|
||||
!cron add 1h #ops !rss check news # Schedule command every hour
|
||||
!cron add 2d #alerts !tor update # Every 2 days
|
||||
!cron del abc123 # Remove job by ID
|
||||
!cron list # List jobs in channel
|
||||
```
|
||||
|
||||
Intervals: `5m`, `1h30m`, `2d`, `90s`, or raw seconds. Min 1m, max 7d.
|
||||
Max 20 jobs/channel. Persists across restarts. Channel only.
|
||||
|
||||
## Plugin Template
|
||||
|
||||
```python
|
||||
|
||||
@@ -141,6 +141,7 @@ format = "text" # Log format: "text" (default) or "json"
|
||||
| `!shorten <url>` | Shorten a URL via FlaskPaste |
|
||||
| `!paste <text>` | Create a paste via FlaskPaste |
|
||||
| `!pastemoni <add\|del\|list\|check>` | Paste site keyword monitoring |
|
||||
| `!cron <add\|del\|list>` | Scheduled command execution (admin) |
|
||||
|
||||
### Command Shorthand
|
||||
|
||||
@@ -1077,6 +1078,42 @@ badhost.invalid -> NXDOMAIN
|
||||
- Concurrent via `asyncio.gather()`
|
||||
- Valid types: A, NS, CNAME, SOA, PTR, MX, TXT, AAAA
|
||||
|
||||
### `!cron` -- Scheduled Command Execution
|
||||
|
||||
Schedule bot commands to repeat on a timer. Admins only.
|
||||
|
||||
```
|
||||
!cron add <interval> <#channel> <command...> Schedule a command
|
||||
!cron del <id> Remove a job
|
||||
!cron list List jobs in channel
|
||||
```
|
||||
|
||||
Examples:
|
||||
|
||||
```
|
||||
!cron add 1h #ops !rss check news Poll RSS feed every hour
|
||||
!cron add 2d #alerts !tor update Update Tor list every 2 days
|
||||
!cron del abc123 Remove job by ID
|
||||
!cron list Show jobs in current channel
|
||||
```
|
||||
|
||||
Output format:
|
||||
|
||||
```
|
||||
Cron #a1b2c3: !rss check news every 1h in #ops
|
||||
#a1b2c3 every 1h: !rss check news
|
||||
```
|
||||
|
||||
- `add` and `del` require admin privileges
|
||||
- `add` and `list` must be used in a channel (not PM)
|
||||
- Interval formats: `5m`, `1h30m`, `2d`, `90s`, or raw seconds
|
||||
- Minimum interval: 1 minute
|
||||
- Maximum interval: 7 days
|
||||
- Maximum 20 jobs per channel
|
||||
- Jobs persist across bot restarts via `bot.state`
|
||||
- Dispatched commands run with the original creator's identity
|
||||
- The scheduled command goes through normal command routing and permissions
|
||||
|
||||
### FlaskPaste Configuration
|
||||
|
||||
```toml
|
||||
|
||||
Reference in New Issue
Block a user