From 75501d82a10998d51d76d9a4973046d42cfe5bf3 Mon Sep 17 00:00:00 2001 From: LamGC Date: Sat, 28 Jan 2023 22:16:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=20cron=20=E5=AE=9A=E6=97=B6=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cf-worker/src/index.js | 2 +- conf-sshd.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cf-worker/src/index.js b/cf-worker/src/index.js index 99779d0..fb21f6b 100644 --- a/cf-worker/src/index.js +++ b/cf-worker/src/index.js @@ -7,7 +7,7 @@ const backupSshKeys = ``; // Worker 的访问地址, 如果不填的话默认为请求的地址, 填了就会用这里的地址(要去 Worker 的触发器那绑定, 否则无效). const defaultBaseUrl = ""; // Cron 表达式, 默认 1 天执行一次更新. -const cronExpression = "0 0 0 * * ?"; +const cronExpression = "0 0 * * *"; // 下面的东西一般不用改. const baseRepoPageUrl = `https://${githubUserName.toLowerCase()}.github.io/${githubInstSshProjectName}/`; diff --git a/conf-sshd.sh b/conf-sshd.sh index aa6669a..0825870 100644 --- a/conf-sshd.sh +++ b/conf-sshd.sh @@ -212,6 +212,6 @@ if [ $(has_param "-c" "--cron") == "true" ]; then chmod +x ~/.conf-sshd/conf-sshd.sh echo "Install conf-sshd script successfully." # 将当前脚本添加到 Crontab 中 - echo "$cron /bin/bash ~/.conf-sshd/conf-sshd.sh -o -k $sshkey_url" | crontab - + echo "$cron /bin/bash ~/.conf-sshd/conf-sshd.sh -o -k $sshkey_url >> ~/.conf-sshd/run.log" | crontab - fi fi