mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 01:39:52 +08:00
默认定时改为随机时间
This commit is contained in:
1 parent
f7cffe3d2d
commit
61e41269ba
2 files changed
+9
-2
No files matched your search
@@ -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