mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
默认定时改为随机时间
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user