mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 06:46:09 +08:00
修复cron正则匹配
This commit is contained in:
parent
8ebe049d82
commit
73642ba11d
|
@ -135,6 +135,7 @@ add_cron() {
|
|||
)
|
||||
cron_name=$(grep "new Env" $file | awk -F "\(" '{print $2}' | awk -F "\)" '{print $1}' | sed 's:^.\(.*\).$:\1:' | head -1)
|
||||
[[ -z $cron_name ]] && cron_name="$file_name"
|
||||
[[ -z $cron_line ]] && cron_line=$(grep "cron:" $file | awk -F ":" '{print $2}' | xargs)
|
||||
[[ -z $cron_line ]] && cron_line="0 6 * * *"
|
||||
result=$(add_cron_api "$cron_line:$cmd_task $file:$cron_name")
|
||||
echo -e "$result"
|
||||
|
|
Loading…
Reference in New Issue
Block a user