路徑: Scripts/ImportIgReminders.csx
批次為指定使用者匯入整年度的提醒紀錄,自動跳過週末與國定假日,只在工作日發送。
安裝 dotnet-script(全域安裝一次即可):
dotnet tool install -g dotnet-script
執行前須設定以下兩個環境變數(或直接修改腳本內的預設值):
| 環境變數 | 說明 | 範例 |
|---|---|---|
LINECLOCKBOT_API_URL |
App Service 的根網址 | https://your-app.azurewebsites.net |
LINECLOCKBOT_API_KEY |
Internal API Key(與 Internal__ApiKey 相同) |
your-secret-key |
dotnet script Scripts/ImportIgReminders.csx -- <year> <lineUserId> [lineUserId2 ...]
<year>:要匯入的年份(例如 2026)<lineUserId>:LINE 使用者 ID,可傳入多個(空格分隔)# 單一使用者
dotnet script Scripts/ImportIgReminders.csx -- 2026 Uxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# 多位使用者
dotnet script Scripts/ImportIgReminders.csx -- 2026 Uaaa111 Ubbb222