---
name: cron-scheduler
description: 定时任务和周期性调度。支持标准 cron 表达式、一次性提醒和持久化任务。
tools:
  - cron
---

# Cron Scheduler

## Overview

定时任务和周期性调度。支持标准 cron 表达式、一次性提醒和持久化任务。

## When to Use

- Use when the task requires Cron Scheduler guidance.

## Required Tools

- `cron`

## Workflow

- Identify whether the user's request matches the skill's trigger conditions.
- Read the relevant source guidance below and apply only the steps that fit the current task.
- Use the required tools deliberately and keep tool output tied to the user's goal.

### Source Guidance

### Cron Scheduler — 定时任务调度

基于 cron 表达式的定时任务和一次性提醒。

#### 工具说明

##### cron
创建和管理 Beaver 定时通知或 Task。
- `action` (str): `add` | `list` | `remove` | `toggle` | `run`
- `message` (str): 触发时执行的任务说明，`add` 时必填
- `schedule` (str): 调度表达式，例如 `every 15m`、`0 9 * * *` 或 ISO 时间
- `every_seconds` (int | None): 固定秒级间隔
- `cron_expr` (str | None): 标准 5 段 cron 表达式
- `tz` (str | None): IANA 时区，例如 `Asia/Shanghai`
- `at_iso` (str | None): 一次性任务的 ISO 时间
- `job_id` (str | None): `remove`、`toggle`、`run` 目标任务 ID
- `enabled` (bool | None): `toggle` 时设置启停状态
- `mode` (str | None): `notification` 或 `task`
- `requires_followup` (bool | None): task 模式下是否需要用户跟进

#### 使用原则

1. 避开 :00 和 :30 整点分钟，分散负载
2. 一次性提醒优先使用 `at_iso` 或清晰的 `schedule`
3. 需要持续提醒时使用 `mode="notification"`，需要 Task 跟踪时才用 `mode="task"`
4. 定期用 `action="list"` 确认任务是否按预期调度
5. 任务触发时 `message` 会完整执行，确保内容自包含

## Validation

- Verify the requested outcome with the most direct available check.
- Report any skipped step, unavailable dependency, or remaining uncertainty explicitly.

## Boundaries

- Do not broaden the task beyond the user's request.
- Do not use tools that are not listed or clearly available in the current runtime.

## Anti-Patterns

- Do not summarize the skill instead of applying it.
- Do not claim completion without validation evidence.
