跪拜 Guibai
← All articles
Frontend · AI Programming

A Zero-Cost Cloud Cron Job That Checks Into WorkBuddy and Pings Your WeChat

By 夏天要喝冰可乐 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Free cloud CI runners like Gitee Go turn a one-off Python script into a hands-off scheduled job without a server, a credit card, or a machine that stays powered on. For developers outside China, the same pattern applies to any CI platform with cron triggers (GitHub Actions, GitLab CI) paired with a push notification service like Pushover or a Slack webhook.

Summary

A single Python script, using only the standard library, reads an access token from a private repo's config file and calls Tencent's WorkBuddy check-in API. It runs on Gitee Go's free CI/CD pipeline, triggered by a cron expression at 09:05 Beijing time every day. The script checks whether today's check-in has already been claimed, executes it if not, and reports the points earned.

Notifications land directly in a personal WeChat account through the free ServerChan push service. The setup eliminates the single point of failure in local automation: a laptop that's asleep or offline. A private Gitee repository holds the token and SendKey, keeping credentials out of public view while the pipeline pulls them at runtime.

Compared to macOS launchd, cloud functions, or GitHub Actions, this combination prioritizes domestic network speed and zero maintenance beyond refreshing an expiring token. The same pattern works for any periodic task that needs an API call and a notification channel.

Takeaways
A zero-dependency Python script calls the WorkBuddy check-in API using a bearer token extracted from the desktop client's local auth file.
Token priority is config.json in a private repo, then an environment variable, then the local macOS auth file, so the same script works locally and in CI.
ServerChan's free tier pushes check-in results to a personal WeChat account through the 方糖 official account.
Gitee Go's scheduled pipeline trigger runs the script daily at 09:05 Beijing time with no local machine required.
Compared to GitHub Actions, Gitee Go offers faster access from within China and an equally straightforward cron-based pipeline setup.
Conclusions

Treating a CI pipeline as a free cron runner is a lightweight alternative to serverless functions for low-frequency, low-stakes automation; the trade-off is less precise scheduling and no guaranteed execution window.

The script's fallback chain for token sources (config file → env var → local auth file) is a practical pattern for any automation that needs to run both on a developer's machine and in a CI environment without code changes.

ServerChan's zero-cost WeChat push fills a gap that Western developers typically solve with paid services like Pushover or by wiring up a Slack/Discord webhook, which often requires a persistent bot or app registration.

Concepts & terms
ServerChan
A free Chinese push-notification service that delivers messages to a user's WeChat via the 方糖 official account. It requires only a SendKey, obtained by scanning a QR code on its website.
Gitee Go
Gitee's built-in CI/CD pipeline service, comparable to GitHub Actions. It supports scheduled cron triggers and free execution minutes for private repositories, making it usable as a no-cost cloud cron runner.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗