部署
配合 cron 实现每日自动签到:
# 每天早上 8:00 执行0 8 * * * cd /path/to/project && node index.mjs编程方式运行
Section titled “编程方式运行”自动加载配置文件
Section titled “自动加载配置文件”import { run } from "./index.mjs";await run();指定配置文件路径
Section titled “指定配置文件路径”await run("/path/to/asign.json");传入配置对象
Section titled “传入配置对象”await run({ caiyun: [{ auth: "你的auth" }],});import { main } from "./index.mjs";const result = await main({ auth: "你的auth" }, { logger: console });