@theclawlab/notifier
v1.0.8
Published
notifier is a Linux CLI tool and daemon for scheduling and executing shell commands.
Readme
notifier
A Linux CLI tool and daemon for scheduling and executing shell commands via file-based task queues and CRON timers.
How it works
- Drop a task file into
tasks/pending/→ daemon picks it up, runs the command, moves it totasks/done/. - Add a timer file with a CRON expression → daemon fires the command on schedule.
- Both instant tasks and timers are plain
KEY=VALUEtext files, making them easy to create programmatically.
Install
From npm
npm install -g @theclawlab/notifierFrom source
npm run build && npm linkQuick start
# Start the daemon
notifier start
# Add an instant task
notifier task add --author me --task-id hello --command "echo hello world"
# Add a daily timer (runs at 9 AM every weekday)
notifier timer add --author me --task-id morning --timer "0 9 * * 1-5" --command "echo good morning"
# Add a second-level timer (runs every 10 seconds)
notifier timer add --author me --task-id heartbeat --timer "*/10 * * * * *" --command "echo tick"
# Check daemon status
notifier status
# List pending tasks
notifier task list
# List timers
notifier timer listCRON format
Both 5-field (minute-level) and 6-field (second-level) expressions are supported:
| Format | Fields | Example | Meaning |
|--------|--------|---------|---------|
| 5-field | min hour day month weekday | 0 9 * * 1-5 | 9 AM on weekdays |
| 6-field | sec min hour day month weekday | */10 * * * * * | every 10 seconds |
Data directory
Default: ~/.local/share/notifier/ — override with NOTIFIER_HOME.
$NOTIFIER_HOME/
├── tasks/pending/ # queued instant tasks
├── tasks/done/ # completed tasks
├── tasks/error/ # malformed task files
├── timers/ # CRON timer definitions
├── logs/ # daemon logs (auto-rotated at 10k lines)
└── notifier.pid # daemon lock fileDocumentation
- USAGE.md — full CLI reference and file format details
