日々の定期運用 / Daily Routine (Cron)
- 日本語
- English
- 简体中文
⏰ Cronで代理作業を完全自動化
OpenClawの最大の強みは、あなたがPCを前にしていなくても、AIが「指定した時間」に勝手に起きて作業をしてくれることです。 このタイマー機能は「Cron(クロン)」と呼ばれます。
「毎朝8時のルーティン」を設定する例
ワークスペースにある cron/jobs.json ファイルを開いて、以下のように設定を書き込みます。
cron/jobs.json
{
"jobs": [
{
"cron": "0 8 * * *",
"payload": {
"message": "毎朝8時ですね。今日のタスクリストを確認し、最新のAI関係のRSSニュースを取得して日本語の要約レポートを作成し、Inboxに保存してください。"
}
}
]
}
0 8 * * *は「毎日、午前8時0分」という意味の書き方です。messageの部分に、「AIにやってほしいこと」を人間が話しかけるように書いておくだけでOKです!
🤖 何を定例に任せる?
- 起床前の情報収集: 朝目覚める頃には、読むべきニュースのまとめがフォルダに用意されている。
- 夕方のバックアップ: 夕方18時に、その日作ったファイルを整理して別の場所へ圧縮・保存する。
- システム監視: 1時間おきにサーバーのログを読み、エラーがあればDiscordに通知を投げる。
これらをすべてAIに丸投げできます。「秘書」としての真価が最も発揮される機能です。
⏰ Total Automation via Cron
The greatest strength of OpenClaw is that even when you are not at your PC, the AI automatically wakes up at "designated times" and performs operations on your behalf. This scheduled timer capability is called "Cron."
Example: "Every Morning 8 AM Routine"
Open the cron/jobs.json file in your workspace and configure it as follows:
cron/jobs.json
{
"jobs": [
{
"cron": "0 8 * * *",
"payload": {
"message": "It is 8 AM. Please check my task list, parse the latest AI RSS news feeds, generate a summary report, and save it to the Inbox."
}
}
]
}
0 8 * * *is standard Cron syntax meaning "Every day at 8:00 AM."- For the
message, simply write out the instructions exactly as you would speak them to a human assistant!
🤖 Routine Inspiration
- Pre-Wakeup Intel: By the time you wake up, a condensed summary of essential industry news is already waiting in your folder.
- Evening Archival: At 6 PM everyday, the AI reorganizes files created that day and compresses them into a backup directory.
- System Monitoring: Every hour, the AI reads server logs and fires a notification to Discord if there are critical errors.
You can offload all of this. This is where the AI truly shines as an autonomous "secretary."
⏰ 通过 Cron 实现彻底的代理自动化
OpenClaw 最强大的优势在于:即使您根本不在电脑前,AI 也能够按照“设定的时间”自动苏醒并替您干活。 这项定时器唤醒功能被称为“Cron”。
示例:“每天早上 8 点的日常流程”
请打开您工作空间中的 cron/jobs.json 文件,并作如下设置:
cron/jobs.json
{
"jobs": [
{
"cron": "0 8 * * *",
"payload": {
"message": "现在是早上 8 点了。请帮我检查今天的任务列表,抓取最新的 AI 行业 RSS 新闻源,生成一份中文摘要报告并存放在 Inbox(收件箱)里。"
}
}
]
}
0 8 * * *是一种标准的写法,意思是“每天,早上 8 点 0 分”。- 在
message部分,您只需要像吩咐人类助手那样,用自然语言写下“希望 AI 帮您做的事”即可!
🤖 适合交给它定时的任务灵感
- 起床前的情报汇编:在您早晨醒位之前,必读的行业新闻要炼就已经静静躺在文件夹中了。
- 傍晚的归档整理:每天下午 18 点,自动将您今天产生的文件杂乱整理好并压缩备份到指定网盘。
- 系统监控哨兵:每隔 1 小时,AI 自动扫描服务器日志,一旦发现异常报错,立刻推送消息到您的 Discord。
所有被您认为枯燥、繁琐的事情,都可以全部抛给 AI 托管代劳。这也是 OpenClaw 展现其真正“完美管家”价值的核心机制。