为 cron 定时执行添加日志.

This commit is contained in:
LamGC 2023-01-28 22:16:59 +08:00
parent 0d4e1368fd
commit 75501d82a1
Signed by: LamGC
GPG Key ID: 6C5AE2A913941E1D
2 changed files with 2 additions and 2 deletions

View File

@ -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}/`;

View File

@ -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