The schedule command manages scheduled agent execution.
Usage
praisonai schedule [OPTIONS] COMMAND [ARGS]...
Commands
| Command | Description |
|---|
add | Add a scheduled job |
start | Start scheduled agent execution |
stop | Stop scheduled job(s) |
list | List scheduled jobs |
logs | View scheduler logs |
restart | Restart a scheduled job |
delete | Delete a scheduled job |
describe | Show job details |
stats | Show scheduler statistics |
Adding Jobs
praisonai schedule add "job-name" \
--schedule "cron:0 9 * * *" \
--message "Good morning! Check tasks." \
--agent support \
--channel telegram \
--channel-id 12345
Options
| Option | Short | Description |
|---|
--schedule | -s | When to run: hourly, daily, */30m, cron:..., at:..., in 20 minutes |
--message | -m | Prompt text to deliver |
--agent | -a | Agent ID to execute this job (default: first registered) |
--deliver | -d | Delivery token: origin, telegram, all, or platform:chat_id[:thread_id] |
--pre-run | | Cheap pre-run gate command: exit 0 + output → run (output seeds the prompt); non-zero → skip (no model tokens, no delivery) |
--condition | | Natural-language / expression alias for the pre-run gate (advisory) |
--channel | | [Legacy] Delivery platform: telegram, discord, slack, whatsapp |
--channel-id | | [Legacy] Target chat/channel ID |
--session-id | | Session ID to preserve conversation context |
--json | | Output JSON |
Examples
Add a daily reminder bound to a specific agent
praisonai schedule add "morning-hello" -s daily -m "say hello" --agent support
Deliver via home channel
praisonai schedule add "news" -s daily -m "summarise AI news" --deliver telegram
Run /sethome in the target chat first.
Fan-out to all home channels
praisonai schedule add "ops-digest" -s "cron:0 * * * *" -m "incident digest" --deliver all
Deliver back to origin chat
praisonai schedule add "stretch" -s "*/2h" -m "time to stretch" \
--deliver origin --channel telegram --channel-id 12345
origin requires --channel and --channel-id so the executor can resolve the creating chat.
Add with delivery target [Legacy]
praisonai schedule add "tg-reminder" \
-s "cron:0 9 * * *" \
-m "check email" \
--agent support \
--channel telegram \
--channel-id 12345
Start scheduler
List scheduled jobs
praisonai schedule list
praisonai schedule list --json
View logs
praisonai schedule logs
praisonai schedule logs --tail 100 --follow
Stop a job
praisonai schedule stop job-123
praisonai schedule stop all
Delete a job
praisonai schedule delete job-123 --yes
Skip the model turn when there are no new emails
praisonai schedule add "inbox-watch" \
-s "*/5m" \
-m "Summarise new emails" \
--pre-run "scripts/new_mail.sh" \
--deliver telegram
--pre-run runs scripts/new_mail.sh before each tick. Exit 0 + stdout → agent runs with that stdout appended to the message. Non-zero exit → tick is skipped, no tokens spent, no Telegram ping.
--pre-run is a trusted, human-configured surface — it is not accepted by the agent-callable schedule_add tool, which prevents a prompt-injected agent from persisting arbitrary shell commands on the host. Configure --pre-run only via the CLI, YAML, or Python.
See Also