Skip to main content
The schedule command manages scheduled agent execution.

Usage

praisonai schedule [OPTIONS] COMMAND [ARGS]...

Commands

CommandDescription
addAdd a scheduled job
startStart scheduled agent execution
stopStop scheduled job(s)
listList scheduled jobs
logsView scheduler logs
restartRestart a scheduled job
deleteDelete a scheduled job
describeShow job details
statsShow 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

OptionShortDescription
--schedule-sWhen to run: hourly, daily, */30m, cron:..., at:..., in 20 minutes
--message-mPrompt text to deliver
--agent-aAgent ID to execute this job (default: first registered)
--deliver-dDelivery token: origin, telegram, all, or platform:chat_id[:thread_id]
--pre-runCheap pre-run gate command: exit 0 + output → run (output seeds the prompt); non-zero → skip (no model tokens, no delivery)
--conditionNatural-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-idSession ID to preserve conversation context
--jsonOutput 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

praisonai schedule start

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