Implement comprehensive error handling for Python code paths to keep services resilient and user-friendly. Use when failures are currently silent or exceptions leak through.
日本語の概要は準備中です。原文の説明を表示しています。
ALWAYS use this skill when the user asks to schedule, automate, set up recurring tasks, create a cron job, or anything involving timed / periodic execution. Do NOT use the local system crontab — scheduled tasks are stored on the Unique AI Platform and executed by a Kubernetes CronJob, not locally. Scheduled tasks always run on the current assistant (`$UNIQUE_ASSISTANT_ID`); never ask the user which assistant to use, neither in chat nor via `unique-cli elicit ask`. This skill covers creating, listing, updating, enabling, disabling, and deleting scheduled tasks via the unique-cli schedule command.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Manage cron-tab style scheduled tasks that trigger an assistant on a recurring schedule. Tasks are stored and executed on the Unique AI Platform (via a Kubernetes CronJob that evaluates all enabled tasks every minute). They are not local crontab entries — do not fall back to crontab -e or similar OS-level scheduling.
Important — always use this skill whenever the user mentions scheduling, recurring execution, cron jobs, timed tasks, or automation. Even if the phrasing sounds like a local cron job, the correct approach is
unique-cli schedule.
Never show raw cron expressions to the user. Always translate them into plain language. The cron syntax is only used in CLI commands — all communication with the user must describe the schedule in natural, human-readable terms.
| Cron expression | Say this to the user |
|---|---|
*/15 * * * * | "every 15 minutes" |
0 9 * * 1-5 | "every weekday (Mon-Fri) at 9:00 AM" |
0 0 * * * | "every day at midnight" |
0 8 1 * * | "on the 1st of every month at 8:00 AM" |
0 8 L * * | "on the last day of every month at 8:00 AM" |
0 8 30 * * | "on the 30th of every month at 8:00 AM — on the last day in February" |
30 17 * * 5 | "every Friday at 5:30 PM" |
0 */2 * * * | "every 2 hours" |
0 9 * * 1 | "every Monday at 9:00 AM" |
0 9,17 * * 1-5 | "every weekday at 9:00 AM and 5:00 PM" |
Rules:
0 9 * * 1-5."0 9 * * * but tell them "Scheduled to run every day at 9:00 AM."Write monthly schedules only as minute hour day * *, where day is 1–30 or the L
token. In that form — and only in that form — a day the month does not have moves to the
month's last day instead of being skipped. A day list (0 8 29,30,31 * *), a range, a step or
a month restriction (0 8 31 1,7 *) falls outside that handling and will skip short
months, after you have told the user it would not.
Rules:
L token:
0 8 L * *. L means the last day of whichever month it is, so it runs in all 12 months:
31 January, 28 (or 29) February, 31 March, 30 April, and so on. Prefer L over 31 — it
says what it means and is unambiguous in every month.0 8 30 * *) and spell out
February: "…on the 30th of every month — in February it runs on the last day of the
month."L anywhere but the day-of-month field, and never combine it with a list, range
or step.0 7 18 11 *) to fake it: it will run, but the schedule
editor cannot display or edit it afterwards.The platform runs all cron schedules in UTC. The user almost certainly thinks in their local timezone. You must account for this difference or tasks will fire at the wrong time.
Before creating or updating a schedule:
Conversion examples (Europe/Zurich, CET = UTC+1 / CEST = UTC+2):
| User says (local) | Season | UTC offset | Cron (UTC) |
|---|---|---|---|
| "9:00 AM" | Winter (CET) | UTC+1 | 0 8 * * * |
| "9:00 AM" | Summer (CEST) | UTC+2 | 0 7 * * * |
| "5:30 PM" | Winter (CET) | UTC+1 | 30 16 * * * |
| "midnight" | Winter (CET) | UTC+1 | 0 23 * * * (previous day in UTC) |
Rules:
Example confirmation:
"Done — scheduled to run every weekday at 9:00 AM (your time, Europe/Zurich). That's 7:00 AM UTC in summer / 8:00 AM UTC in winter. Note: the exact local time will shift by 1 hour when daylight saving changes."
!!! danger "Never ask the user which assistant to schedule"
The scheduled task must always run on the current assistant — the same
assistant the user is talking to right now. Never prompt the user for
an assistant ID, neither in chat nor via unique-cli elicit ask. Read the
UNIQUE_ASSISTANT_ID environment variable and pass it as --assistant
verbatim. If UNIQUE_ASSISTANT_ID is unset, stop and tell the user the
environment is missing — do not fall back to asking them.
Before running schedule create, resolve / ask the user:
$UNIQUE_ASSISTANT_ID (the current assistant). Do not
ask. Do not run unique-cli schedule list to "find" one. Do not start an
elicitation. If the env var is missing, surface that as an error and stop.--chat-id. Each execution creates a fresh chat.chat_). Pass it via --chat-id.--name. Keep it at most 128 characters — a longer name is rejected and the
whole schedule create fails. Tell the user what you called it when you confirm.Only pass --chat-id when the user explicitly wants to continue a specific chat. Otherwise leave it out.
!!! tip "Confirming the assistant in plain language"
When you confirm the schedule back to the user, just say "this assistant"
(or its display name if you already know it from the chat context). Do
not read the raw assistant_… ID back to the user.
| Entity | Prefix | Example |
|---|---|---|
| Assistant | assistant_ | assistant_cvj3fd7x8hpt1hfp0akqu1rq |
| Chat | chat_ | chat_b7ze6mpv0edy324yhjj1d92t |
unique-cli schedule list
Output shows a table with status, name, cron expression, assistant, prompt snippet, task ID, and last run time. A task saved without a name shows its prompt snippet in the name column.
unique-cli schedule get <task_id>
Shows full details of a single task including all fields.
Always pass --assistant "$UNIQUE_ASSISTANT_ID" so the task runs on the
current assistant. Do not substitute a literal assistant_… ID and do not
ask the user to provide one.
--chat-id)unique-cli schedule create \
--cron "0 9 * * 1-5" \
--assistant "$UNIQUE_ASSISTANT_ID" \
--prompt "Generate the daily sales report and email it to the team" \
--name "Daily sales report"
unique-cli schedule create \
--cron "0 9 * * 1-5" \
--assistant "$UNIQUE_ASSISTANT_ID" \
--chat-id chat_b7ze6mpv0edy324yhjj1d92t \
--prompt "Append today's numbers to the running report" \
--name "Running report top-up"
| Option | Short | Required | Description |
|---|---|---|---|
--cron | -c | Yes | 5-field cron expression |
--assistant | -a | Yes | Assistant ID to execute (starts with assistant_). Always pass "$UNIQUE_ASSISTANT_ID" — never ask the user. |
--prompt | -p | Yes | Prompt text sent each run |
--name | -n | No | Short label shown in the UI (≤128 chars). Always pass one — you generate it; without it the UI falls back to the prompt text |
--chat-id | No | Continue an existing chat (starts with chat_; omit for new chat each run) | |
--disabled | No | Create in disabled state |
The user will describe schedules in plain language. Translate silently:
| User says | Cron expression |
|---|---|
| "every 15 minutes" | */15 * * * * |
| "every weekday at 9 AM" / "every morning Mon–Fri" | 0 9 * * 1-5 |
| "every day at midnight" | 0 0 * * * |
| "first of every month at 8 AM" | 0 8 1 * * |
| "the 31st of every month at 8 AM" | 0 8 L * * (the 31st means the last day) |
| "the 30th of every month at 8 AM" | 0 8 30 * * (February runs on its last day) |
| "last day of every month at 8 AM" | 0 8 L * * |
| "every Friday at 5:30 PM" | 30 17 * * 5 |
| "every 2 hours" | 0 */2 * * * |
| "twice a day at 9 AM and 5 PM, weekdays" | 0 9,17 * * 1-5 |
| "every Monday at 9 AM" | 0 9 * * 1 |
| "every hour" | 0 * * * * |
| "every day at 6:30 AM" | 30 6 * * * |
┌───────────── minute (0–59)
│ ┌───────────── hour (0–23)
│ │ ┌───────────── day of month (1–31, or L for the last day)
│ │ │ ┌───────────── month (1–12)
│ │ │ │ ┌───────────── day of week (0–7, 0 and 7 = Sunday)
│ │ │ │ │
* * * * *
Day-of-week mapping: 0=Sun, 1=Mon, 2=Tue, 3=Wed, 4=Thu, 5=Fri, 6=Sat, 7=Sun
Only the fields you provide are changed; everything else stays the same.
# Change the schedule
unique-cli schedule update <task_id> --cron "0 9 * * 1-5"
# Disable a task
unique-cli schedule update <task_id> --disable
# Enable and change prompt
unique-cli schedule update <task_id> --enable --prompt "Updated daily report"
# Clear the chat ID (new chat each run)
unique-cli schedule update <task_id> --chat-id none
| Option | Short | Description |
|---|---|---|
--cron | -c | Updated cron expression |
--assistant | -a | Updated assistant ID (starts with assistant_) |
--prompt | -p | Updated prompt text |
--name | -n | Updated label (none to clear it and fall back to the prompt) |
--chat-id | Updated chat ID (starts with chat_; none to clear) | |
--enable | Enable the task | |
--disable | Disable the task |
unique-cli schedule delete <task_id>
This action cannot be undone.
User: "Schedule a daily sales report every weekday at 9 AM"
Agent (if timezone unknown): "What timezone are you in?"
User: "Zurich"
Agent thinks: Europe/Zurich, currently CEST (UTC+2), so 9:00 AM local = 7:00 AM UTC → cron 0 7 * * 1-5. The assistant is the current one ($UNIQUE_ASSISTANT_ID); no need to ask.
Run:
unique-cli schedule create \
-c "0 7 * * 1-5" \
-a "$UNIQUE_ASSISTANT_ID" \
-p "Generate the daily sales report and email it to the team" \
-n "Daily sales report"
Respond: "Done — I created Daily sales report, running every weekday (Mon–Fri) at 9:00 AM your time (Europe/Zurich). That's 7:00 AM UTC. A new chat will be created for each run. Note: when clocks change for daylight saving, the task will shift by one hour in your local time."
User: "I want to add daily numbers to an existing report chat at 9 AM"
Agent thinks: Already know timezone is Europe/Zurich (CEST), 9 AM local = 7 AM UTC. Assistant is the current one ($UNIQUE_ASSISTANT_ID).
Run:
unique-cli schedule create \
-c "0 7 * * 1-5" \
-a "$UNIQUE_ASSISTANT_ID" \
--chat-id chat_b7ze6mpv0edy324yhjj1d92t \
-p "Append today's numbers to the running report" \
-n "Running report top-up"
Respond: "Done — I created Running report top-up, running every weekday (Mon–Fri) at 9:00 AM your time (7:00 AM UTC), continuing chat chat_b7ze6mpv0edy324yhjj1d92t."
unique-cli schedule update <task_id> --disable
Respond: "The task has been paused. It won't run until you re-enable it."
unique-cli schedule update <task_id> --enable
Respond: "The task is active again and will run on its next scheduled time."
User: "Change it to run every hour instead"
Agent thinks: "every hour" is interval-based, no timezone conversion needed.
Run:
unique-cli schedule update <task_id> --cron "0 * * * *"
Respond: "Updated — the task now runs every hour, on the hour (UTC). Since this is interval-based, it runs at the same wall-clock intervals regardless of timezone."
User: "Actually, make it run at 6:30 PM my time on Fridays"
Agent thinks: Europe/Zurich CEST (UTC+2), 6:30 PM = 16:30 UTC → cron 30 16 * * 5
Run:
unique-cli schedule update <task_id> --cron "30 16 * * 5"
Respond: "Updated — the task now runs every Friday at 6:30 PM your time (4:30 PM UTC)."
The CLI is backed by the unique_sdk.ScheduledTask API resource:
import unique_sdk
unique_sdk.api_key = "ukey_..."
unique_sdk.app_id = "app_..."
# Create (new chat each run — no chatId)
task = unique_sdk.ScheduledTask.create(
user_id="user_123",
company_id="company_456",
cronExpression="0 9 * * 1-5",
assistantId="assistant_cvj3fd7x8hpt1hfp0akqu1rq",
prompt="Generate daily report",
name="Daily report",
)
# Create (continue existing chat)
task = unique_sdk.ScheduledTask.create(
user_id="user_123",
company_id="company_456",
cronExpression="0 9 * * 1-5",
assistantId="assistant_cvj3fd7x8hpt1hfp0akqu1rq",
chatId="chat_b7ze6mpv0edy324yhjj1d92t",
prompt="Append today's data",
)
# List
tasks = unique_sdk.ScheduledTask.list(
user_id="user_123",
company_id="company_456",
)
# Retrieve
task = unique_sdk.ScheduledTask.retrieve(
user_id="user_123",
company_id="company_456",
id="<task_id>",
)
# Update
task = unique_sdk.ScheduledTask.modify(
user_id="user_123",
company_id="company_456",
id="<task_id>",
enabled=False,
)
# Delete
unique_sdk.ScheduledTask.delete(
user_id="user_123",
company_id="company_456",
id="<task_id>",
)
All methods have *_async variants for async usage.
Requires these environment variables:
UNIQUE_USER_ID # User ID (required)
UNIQUE_COMPANY_ID # Company ID (required)
UNIQUE_ASSISTANT_ID # Current assistant ID — required when an agent uses this
# skill. Always pass it as --assistant on schedule create
# so the task runs on the same assistant the user is
# currently chatting with.
UNIQUE_API_KEY # API key — optional on localhost / secured cluster
UNIQUE_APP_ID # App ID — optional on localhost / secured cluster
Install: pip install unique-sdk
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Implement comprehensive error handling for Python code paths to keep services resilient and user-friendly. Use when failures are currently silent or exceptions leak through.
日本語の概要は準備中です。原文の説明を表示しています。
Tabular and numerical data analysis with descriptive statistics and insights. Use when the user provides data, tables, CSVs, or numbers and wants analysis.
日本語の概要は準備中です。原文の説明を表示しています。
Financial factsheet analysis with key metrics extraction and investment rationale
日本語の概要は準備中です。原文の説明を表示しています。
Diagnose and fix CI failures without leaving your editor.
日本語の概要は準備中です。原文の説明を表示しています。
Reproduce ai-repo PR checks locally with Poe and CI scripts, including per-package typecheck and coverage behavior. Use when validating changes before push or when user asks which local commands match CI.
日本語の概要は準備中です。原文の説明を表示しています。
Ask clarifying questions before implementing to ensure Python requirements are understood. Use when a task lacks detail, dependencies are unclear, or multiple interpretations are possible.
日本語の概要は準備中です。原文の説明を表示しています。