Skip to content
Grok Bot Scheduled Tasks in Practice: Daily Topic Scanning & Codex CLI Automation

Grok Bot Scheduled Tasks in Practice: Daily Topic Scanning & Codex CLI Automation

The author shares two real-world Grok Bot scheduled tasks — daily technical topic scanning from X, GitHub, and tech sites with deduplication against published articles, and daily Codex CLI 'hi' commands to manage usage windows — including complete prompts, configuration steps, and iterative rule refinements.

Eric Tech Circle
Eric Tech Circle
Eric Tech Circle

Practice

01 Daily Topic Push

This task is handled by Scout, the topic-selection bot. It only finds topics and verifies references; the author decides which article to write and how.

The scheduled time is set to 09:07 Singapore time (Asia/Singapore timezone) to avoid the exact hour. After scanning, results are pushed to the conversation between the bot and the author.

Below is the prompt distilled from the current rules. Replace the {placeholders} with your own information and send it to the topic-responsible bot to create the scheduled task.

请创建一个「每日选题扫描」定时任务,每天新加坡时间 9:07 执行,时区使用 Asia/Singapore。

## 角色
- 你是 {你的身份} 的选题与资讯助手,只出选题清单和参考资料,不碰我的文章文件,不写正文
- 群聊里只负责选题和事实核查,不参与写作讨论
- 全部用中文,语气口语直接,不要 AI 味

## 关注范围
- 扫描 X、GitHub 和主流技术站上 {你的领域} 近 7 天的新动态
- 重点关注 {工具列表},工具只当素材,不当选题本身
- 长期跟踪 {你的长期主题},具体做法优先,泛泛的建议不收
- 看外部工具时,重点写有什么做法能借鉴,不要求我换工具

## 选题主线
按主题出题,每条标明服务哪条主线。以下替换成你自己的方向:
1. 生产级 AI 开发流程
2. 上下文治理与长任务跑偏
3. AI 代码评审与质量把关
4. 开源 harness 和模型的选择与组合
5. Personal Agent 产品与实践

## 筛选规则
- 最多 10 个,宁缺毋滥,不拿弱选题凑数
- 只是发新版、推不动任何主线的不收
- 纯 bugfix 版本和已停止维护的工具不收
- 超过 7 天的动态只作为「补课」收录,并标明原始发布日期
- 只用实际打开过的来源,优先使用官方发布、官方博客和原始研究;厂商自测和二手转述要注明
- 日期、版本号、价格和数据核实后再写,不确定就写不确定,不编造
- 选题要写得出观点和取舍,不做功能罗列

## 能否实测
- 我现有的订阅是:{你的订阅}
- 能不能实测只影响排序,不直接决定是否收录
- 需要我没有的账号,标明「需额外账号」及具体服务
- 基于 {你已有的流程和经验} 能写成经验文的,优先推荐

## 查重
- 对照 GitHub 上 {仓库} 的 {索引路径} 查重
- 与已发文章相近的,说明和哪篇重复、这次有什么新角度;没有新角度就剔除
- 索引读取失败,注明「未能查重」,选题照常给
- 说明本次读到的索引最新收录到哪一天

## 输出格式
- 开头一行总览:共几个选题,强、中、弱各几个;再用一句话说明首推哪个、为什么
- 每条按强、中、弱排序,条与条之间用分隔线隔开
- 每条包含:
  - 标题:<a style="color: #576B95 !important">#序号</a> 主题:结论或关键数据
  - 标签:评级、所属主线、实测条件、时效
  - 事件:一句话讲清发生了什么
  - 核心论点:一句能写出的判断或取舍
  - 实测方案:用什么项目、对比什么、记录什么
  - 待核实:未核实的事实及与旧文的重叠,没有就省略
  - 来源:2–3 条实际打开过的链接,标明一手或二手,每条用一句话说明参考价值
- 结尾说明剔除了什么、为什么,以及查重索引的更新日期

## 运行要求
- 控制工作量,不在单个来源上反复深挖
- 结果推送到 {推送位置}

The topic lines above are the author's own long-term writing directions. If you focus on other domains, simply replace them; there is no need to copy the tools and themes verbatim.

Deduplication requires pre-connecting to GitHub and authorizing the bot to access the repository where the article index lives. This way, reading the index does not depend on the local computer staying on.

After creating the task, open its details to verify the saved time, timezone, and prompt. You can run a test execution first to see if the output matches expectations before waiting for the next scheduled run. Official scheduled task documentation: https://docs.x.ai/grok-bot/skills-routines-and-automations Several rules in this prompt were added after encountering pitfalls.

Initially the rule was "give 10 every day," but one day the 10th item turned out to be a minor bugfix release that was only included to pad the count. The rule was then changed to "maximum 10, quality over quantity" — fewer items are delivered when there aren't enough strong candidates.

Topics must follow the defined lines. Early on the bot was told to watch Codex and Pi, so it recommended whichever released a new version; the suggestions became repetitive. The fix was to have it propose topics along the author's own thematic lines, treating tools only as raw material.

Testability was also adjusted. The author does not write articles that merely paraphrase others' conclusions, but filtering out untestable items would hide many popular developments. For example, Haiku 5.5 was recommended when the author lacked the corresponding subscription; now such topics are tagged with their test conditions and placed lower in the list, leaving the decision to the author.

Deduplication prevents overlap with previously published tutorial articles; similar topics are either dropped or deprioritized.

02 Daily 'hi' to Codex

The second task is simpler: at fixed times each day, send a single hi to the Codex CLI running on a local Mac mini.

The original intent was to start Codex's five-hour quota window early so it aligns better with the author's working hours. A second daily run was added later, at 08:00 and 13:30.

Note: quota rules change. Current official documentation states that the Pro plan no longer has a five-hour quota limit; whether this scheduling is needed depends on your own account's actual limits and reset times. Codex quota explanation:

https://learn.chatgpt.com/docs/pricing#what-are-the-usage-limits-for-my-plan

The task configuration below is retained as an example of scheduled local command execution.

This task is assigned to Chief of Staff (the chief assistant bot). The execution target is the local Mac mini, which must have Codex CLI pre-installed and logged in, with permission granted for the bot to run commands on that machine, and the machine must stay online.

The prompt:

请创建两个定时任务,由你负责在我的本地 Mac mini 上执行,时区统一使用 Asia/Singapore。

任务一:每天早上 8:00 执行,最晚不超过 8:15。
任务二:每天下午 13:30 准点执行。

每次只运行下面这条命令一次,给 Codex CLI 发送 hi:

zsh -ic 'cd ~ && codex exec --skip-git-repo-check "hi" </dev/null'

执行要求:
- 使用本机通过 nvm 安装的 Codex CLI
- 沿用 ~/.codex/config.toml 的默认设置
- 不覆盖模型和沙盒设置
- 不重试
- 成功或失败都用中文一句话告诉我
- 失败时说明原因,不要把失败报成成功

The command uses codex exec to pass the prompt directly for non-interactive execution. --skip-git-repo-check allows running outside a Git repository, so the command can first change to the user home directory and then send hi. Codex CLI command reference: https://learn.chatgpt.com/docs/cli/reference#codex-exec The outer zsh -ic loads the usual shell environment, including nvm configuration. Readers adapting this must verify their own Codex CLI installation method and command path.

This task involves far less judgment than topic scanning, so the prompt is much shorter. Specifying the times, target machine, command, and result reporting is sufficient.

The author did not ask the bot to auto-switch models, modify configs, or retry on failure. It simply reports success or failure in one Chinese sentence; the author then investigates any failures.

Closing

The topic bot's rules were added one by one, but when they accumulate, subtraction is also necessary.

Once a scan ran about 90 minutes later than expected; the author suspected rule overload and did a simplification pass. That was only a hypothesis at the time — the delay hasn't been definitively attributed to the rules. Ongoing observation of push quality and execution behavior is still needed.

The Codex hi task is simpler: run the original command on schedule and report the result. Both types of daily repetitive work are now in scheduled tasks; the author picks topics and handles execution failures.

References

[1]

Official scheduled task documentation:

https://docs.x.ai/grok-bot/skills-routines-and-automations
[2]

Codex quota explanation:

https://learn.chatgpt.com/docs/pricing#what-are-the-usage-limits-for-my-plan
[3]

Codex CLI command reference:

https://learn.chatgpt.com/docs/cli/reference#codex-exec
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

automationprompt engineeringdeduplicationworkflow optimizationscheduled tasksCodex CLIGrok Bottopic scanning
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.