默认定时改为随机时间

This commit is contained in:
hanhh
2021-08-21 19:26:37 +08:00
parent f7cffe3d2d
commit 61e41269ba
2 changed files with 9 additions and 2 deletions
+7
View File
@@ -64,6 +64,7 @@ import_config() {
command_timeout_time=${CommandTimeoutTime:-"1h"}
github_proxy_url=${GithubProxyUrl:-""}
file_extensions=${RepoFileExtensions:-"js py"}
default_cron="$(random_range 0 59) $(random_range 0 23) * * *"
}
make_dir() {
@@ -302,6 +303,12 @@ reset_romote_url() {
fi
}
random_range() {
local beg=$1
local end=$2
echo $((RANDOM % ($end - $beg) + $beg))
}
init_env
detect_termux
detect_macos