Skip to main content

Scheduler CLI (TypeScript)

Schedule agents and recipes to run periodically using the praisonai-ts CLI.

Installation

npm install -g praisonai-ts

Commands Overview

CommandDescription
praisonai-ts schedule startStart a new scheduler
praisonai-ts schedule listList all schedulers
praisonai-ts schedule stop <name>Stop a scheduler
praisonai-ts schedule logs <name>View scheduler logs
praisonai-ts schedule statsShow statistics

Start a Scheduler

With a Task

# Basic scheduler
praisonai-ts schedule start news-checker "Check AI news" --interval hourly

# With timeout and budget
praisonai-ts schedule start reporter "Generate report" \
    --interval daily \
    --timeout 300 \
    --max-cost 1.00

With a Recipe

# Schedule a recipe
praisonai-ts schedule start news-monitor --recipe news-analyzer --interval hourly

# With all options
praisonai-ts schedule start my-scheduler \
    --recipe my-recipe \
    --interval "*/6h" \
    --timeout 600 \
    --max-cost 2.00 \
    --max-retries 3

Start Options

OptionDescription
--recipeRecipe name to schedule
--intervalSchedule interval
--timeoutTimeout per execution
--max-costMaximum budget in USD
--max-retriesMaximum retry attempts

Interval Formats

FormatDescription
hourlyEvery hour
dailyEvery day
*/30mEvery 30 minutes
*/6hEvery 6 hours

List Schedulers

praisonai-ts schedule list

Stop a Scheduler

praisonai-ts schedule stop news-checker

View Logs

praisonai-ts schedule logs news-checker
praisonai-ts schedule logs news-checker --follow

Show Statistics

praisonai-ts schedule stats
praisonai-ts schedule stats news-checker

Examples

Complete Workflow

# 1. Start a recipe scheduler
praisonai-ts schedule start news-monitor \
    --recipe news-analyzer \
    --interval hourly

# 2. List schedulers
praisonai-ts schedule list

# 3. Check logs
praisonai-ts schedule logs news-monitor --follow

# 4. View stats
praisonai-ts schedule stats news-monitor

# 5. Stop when done
praisonai-ts schedule stop news-monitor

Multiple Schedulers

# Start multiple
praisonai-ts schedule start hourly-news --recipe news-monitor --interval hourly
praisonai-ts schedule start daily-report --recipe report-generator --interval daily

# List all
praisonai-ts schedule list

# Stop all
praisonai-ts schedule stop hourly-news
praisonai-ts schedule stop daily-report

See Also