Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/remorses/kimaki/llms.txt

Use this file to discover all available pages before exploring further.

Kimaki’s task management commands let you inspect and control scheduled tasks created with the --send-at flag.

Commands

List tasks

View all scheduled tasks:
kimaki task list

Delete a task

Cancel a scheduled task by ID:
kimaki task delete <task-id>

Listing tasks

The task list command shows all scheduled tasks with their details:
$ kimaki task list

Scheduled tasks:

ID: 1
  Created: 2026-03-01T10:30:00.000Z
  Schedule: cron "0 9 * * 1" (America/Los_Angeles) next 2026-03-08T17:00:00.000Z
  Channel: 1234567890123456789
  Prompt: Run weekly test suite and report failures
  Next run: 6d 8h

ID: 2
  Created: 2026-03-01T14:00:00.000Z
  Schedule: one-time at 2026-03-02T09:00:00.000Z
  Thread: 9876543210987654321
  Prompt: Reminder: review PR #42
  Next run: 18h

Output fields

ID
number
Unique task identifier. Use this with task delete.
Created
timestamp
When the task was scheduled.
Schedule
string
  • One-time: Shows the UTC timestamp
  • Recurring: Shows cron expression, timezone, and next run time
Channel
string
Discord channel ID (for tasks that create new threads).
Thread
string
Discord thread ID (for tasks that send to existing threads).
Prompt
string
The message that will be sent when the task runs.
Next run
string
Relative time until the task executes (e.g., “6d 8h”, “18h”, “30m”).

Deleting tasks

Cancel a scheduled task before it runs:
kimaki task delete 1
The task is removed from the database and will not execute.
Deleting a task is permanent. You’ll need to reschedule it with kimaki send --send-at if you delete it by mistake.

Examples

Check upcoming tasks

kimaki task list

Cancel a one-time task

# List tasks to find the ID
kimaki task list

# Delete task 2
kimaki task delete 2

Cancel a recurring task

# Stop the weekly test run
kimaki task delete 1

Reschedule by deleting and recreating

# Cancel old task
kimaki task delete 3

# Create new task with updated schedule
kimaki send \
  --channel 123 \
  --prompt "Updated task" \
  --send-at "0 10 * * 1"  # Changed from 9am to 10am

Task lifecycle

  1. Creation: Tasks are created with kimaki send --send-at
  2. Storage: Stored in SQLite database at ~/.kimaki/discord-sessions.db
  3. Scheduling: Task runner checks every minute for due tasks
  4. Execution: When due, the task creates a Discord message
  5. Recurring tasks: Next run time is calculated and task is rescheduled
  6. One-time tasks: Deleted from database after execution
Recurring tasks (cron expressions) never auto-delete. They run indefinitely until you delete them manually.

Task storage

Tasks are stored in the scheduled_tasks table in the database:
CREATE TABLE scheduled_tasks (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  created_at TEXT NOT NULL,
  schedule_kind TEXT NOT NULL,  -- 'at' or 'cron'
  run_at TEXT,                  -- UTC timestamp for one-time tasks
  cron_expr TEXT,               -- Cron expression for recurring tasks
  timezone TEXT,                -- Timezone for cron evaluation
  payload TEXT NOT NULL         -- JSON with channel, prompt, options
);
You can inspect this table directly with SQLite tools:
sqlite3 ~/.kimaki/discord-sessions.db "SELECT * FROM scheduled_tasks;"

Troubleshooting

Check that you’re using the correct --data-dir. Each Kimaki instance has its own database and task list.
Cron expressions use your local timezone, not UTC. Verify the timezone with task list output.
Tasks create Discord messages. Your Kimaki bot process must be running to detect and handle these messages.
Ensure you’re using the correct task ID from task list. IDs are database-specific and may differ between Kimaki instances.

Best practices

Run kimaki task list after scheduling tasks to verify they were created correctly and check the next run time.
For long-running Kimaki instances, periodically review scheduled tasks to remove outdated or unused recurring tasks.
Deleting the SQLite database removes all scheduled tasks. Back up the database before manual modifications.

Build docs developers (and LLMs) love