{"id":"55e79d03-c64e-48f4-983e-fec58b1b9587","slug":"clawhub-534422530-laosi-scheduler","name":"Scheduler Pro","description":"任务调度 - 定时任务/周期性任务/一次性提醒，cron语法支持，持久化存储，下次执行时间自动计算","canonicalUrl":"https://www.xpersona.co/agent/clawhub-534422530-laosi-scheduler","sourceUrl":"https://clawhub.ai/534422530/laosi-scheduler","homepage":"https://clawhub.ai/534422530/skills/laosi-scheduler","source":"CLAWHUB","vendor":{"slug":"clawhub","label":"Clawhub","url":"https://clawhub.ai/534422530/skills/laosi-scheduler"},"protocols":["OPENCLEW"],"capabilities":[],"trustScore":null,"trustConfidence":"unknown","artifactCount":0,"benchmarkCount":0,"lastRelease":"2.0.0","freshnessAt":"2026-10-11T13:36:26.534Z","freshnessLabel":"Oct 11, 2026","securityReviewed":true,"openapiReady":false,"stats":[{"label":"Trust score","value":"Unknown"},{"label":"Compatibility","value":"OpenClaw"},{"label":"Freshness","value":"Oct 11, 2026"},{"label":"Vendor","value":"Clawhub"},{"label":"Artifacts","value":"0"},{"label":"Benchmarks","value":"0"},{"label":"Last release","value":"2.0.0"}],"factsPreview":[{"factKey":"vendor","category":"vendor","label":"Vendor","value":"Clawhub","href":"https://clawhub.ai/534422530/skills/laosi-scheduler","sourceUrl":"https://clawhub.ai/534422530/skills/laosi-scheduler","sourceType":"profile","confidence":"medium","observedAt":"2026-10-11T13:36:26.548Z","isPublic":true},{"factKey":"protocols","category":"compatibility","label":"Protocol compatibility","value":"OpenClaw","href":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-scheduler/contract","sourceUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-scheduler/contract","sourceType":"contract","confidence":"medium","observedAt":"2026-10-11T13:36:26.548Z","isPublic":true},{"factKey":"traction","category":"adoption","label":"Adoption signal","value":"1.1K downloads","href":"https://clawhub.ai/534422530/laosi-scheduler","sourceUrl":"https://clawhub.ai/534422530/laosi-scheduler","sourceType":"profile","confidence":"medium","observedAt":"2026-10-11T13:36:26.548Z","isPublic":true},{"factKey":"latest_release","category":"release","label":"Latest release","value":"2.0.0","href":"https://clawhub.ai/534422530/laosi-scheduler","sourceUrl":"https://clawhub.ai/534422530/laosi-scheduler","sourceType":"release","confidence":"medium","observedAt":"2026-05-29T23:31:25.261Z","isPublic":true},{"factKey":"handshake_status","category":"security","label":"Handshake status","value":"UNKNOWN","href":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-scheduler/trust","sourceUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-scheduler/trust","sourceType":"trust","confidence":"medium","observedAt":null,"isPublic":true}],"highlights":["1.1K downloads","Trust evidence available"],"agentCard":{"name":"Scheduler Pro","description":"任务调度 - 定时任务/周期性任务/一次性提醒，cron语法支持，持久化存储，下次执行时间自动计算","source":"CLAWHUB","sourceId":"clawhub:s170k9770tgh0506hw0dwtb6pd83kwyq:laosi-scheduler","homepage":"https://clawhub.ai/534422530/skills/laosi-scheduler","repository":"https://clawhub.ai/534422530/laosi-scheduler","documentation":"https://www.xpersona.co/agent/clawhub-534422530-laosi-scheduler","protocols":["OPENCLEW"],"examples":[{"kind":"example","language":"python","snippet":"import os, json, re\nfrom datetime import datetime, timedelta\nfrom typing import List, Optional, Dict\nfrom dataclasses import dataclass, field, asdict\n\nSCHEDULE_FILE = os.path.join(os.path.dirname(__file__), \"scheduled_tasks.json\")\n\n@dataclass\nclass ScheduledTask:\n    name: str\n    schedule: str  # cron表达�? \"minute hour day month weekday\"\n    description: str = \"\"\n    enabled: bool = True\n    last_run: Optional[str] = None\n    next_run: Optional[str] = None\n    created: str = \"\"\n    run_count: int = 0\n    tags: List[str] = field(default_factory=list)\n\nclass Scheduler:\n    def __init__(self):\n        os.makedirs(os.path.dirname(SCHEDULE_FILE), exist_ok=True)\n        self.tasks: List[ScheduledTask] = []\n        self._load()\n    \n    def _load(self):\n        if os.path.exists(SCHEDULE_FILE):\n            with open(SCHEDULE_FILE, encoding=\"utf-8\") as f:\n                data = json.load(f)\n                self.tasks = [ScheduledTask(**t) for t in data]\n    \n    def _save(self):\n        with open(SCHEDULE_FILE, \"w\", encoding=\"utf-8\") as f:\n            json.dump([asdict(t) for t in self.tasks], f,\n                      ensure_ascii=False, indent=2)\n    \n    def add_task(self, name: str, schedule: str,\n                 description: str = \"\", tags: list = None) -> ScheduledTask:\n        \"\"\"添加定时任务\"\"\"\n        task = ScheduledTask(\n            name=name,\n            schedule=schedule,\n            description=description,\n            enabled=True,\n            created=datetime.now().isoformat(),\n            next_run=self._calc_next_run(schedule),\n            tags=tags or []\n        )\n        self.tasks.append(task)\n        self._save()\n        return task\n    \n    def _calc_next_run(self, cron_expr: str) -> str:\n        \"\"\"计算下次执行时间（简化实现）\"\"\"\n        parts = cron_expr.strip().split()\n        if len(parts) != 5:\n            return datetime.now().isoformat()\n        \n        minute, hour, day, month, weekday = parts\n        now = datetime.now()\n        \n        # 简单解析：如果只有小时和分钟指�?     "},{"kind":"example","language":"text","snippet":"* * * * *\n�?�?�?�?�?�?�?�?�?└── 星期 (0-7, 0�?=周日)\n�?�?�?└──── 月份 (1-12)\n�?�?└────── 日期 (1-31)\n�?└──────── 小时 (0-23)\n└────────── 分钟 (0-59)"}]}}