Compare commits

...

2 Commits

Author SHA1 Message Date
whyour c0977f9e37 更新版本 v2.13.5 2022-07-17 22:29:25 +08:00
whyour e9b85347f4 修复shell获取时间 2022-07-17 13:24:59 +08:00
3 changed files with 33 additions and 29 deletions
+11
View File
@@ -401,6 +401,17 @@ format_time() {
fi
}
format_log_time() {
local format="$1"
local time="$2"
if [[ $is_macos -eq 1 ]]; then
echo $(date -j -f "$format" "$time" "+%Y-%m-%d-%H-%M-%S")
else
echo $(date -d "$time" "+%Y-%m-%d-%H-%M-%S")
fi
}
format_timestamp() {
local format="$1"
local time="$2"
+18 -16
View File
@@ -84,8 +84,8 @@ run_normal() {
fi
fi
local time=$(date "+%Y-%m-%d-%H-%M-%S")
log_time="$time"
local time=$(date "+$time_format")
log_time=$(format_log_time "$time_format" "$time")
log_dir_tmp="${file_param##*/}"
if [[ $file_param =~ "/" ]]; then
if [[ $file_param == /* ]]; then
@@ -103,8 +103,9 @@ run_normal() {
[[ "$show_log" == "true" ]] && cmd=""
make_dir "$dir_log/$log_dir"
local begin_time=$(format_time "%Y-%m-%d-%H-%M-%S" "$time")
local begin_timestamp=$(format_timestamp "%Y-%m-%d-%H-%M-%S" "$time")
local begin_time=$(format_time "$time_format" "$time")
local begin_timestamp=$(format_timestamp "$time_format" "$time")
eval echo -e "\#\# 开始执行... $begin_time\\\n" $cmd
[[ -f $task_error_log_path ]] && eval cat $task_error_log_path $cmd
@@ -155,8 +156,8 @@ run_concurrent() {
[[ ! -z $cookieStr ]] && export ${env_param}=${cookieStr}
define_program "$file_param"
local time=$(date "+%Y-%m-%d-%H-%M-%S")
log_time="$time"
local time=$(date "+$time_format")
log_time=$(format_log_time "$time_format" "$time")
log_dir_tmp="${file_param##*/}"
if [[ $file_param =~ "/" ]]; then
if [[ $file_param == /* ]]; then
@@ -174,8 +175,8 @@ run_concurrent() {
[[ "$show_log" == "true" ]] && cmd=""
make_dir "$dir_log/$log_dir"
local begin_time=$(format_time "%Y-%m-%d-%H-%M-%S" "$time")
local begin_timestamp=$(format_timestamp "%Y-%m-%d-%H-%M-%S" "$time")
local begin_time=$(format_time "$time_format" "$time")
local begin_timestamp=$(format_timestamp "$time_format" "$time")
eval echo -e "\#\# 开始执行... $begin_time\\\n" $cmd
[[ -f $task_error_log_path ]] && eval cat $task_error_log_path $cmd
@@ -225,8 +226,8 @@ run_designated() {
fi
define_program "$file_param"
local time=$(date "+%Y-%m-%d-%H-%M-%S")
log_time="$time"
local time=$(date "+$time_format")
log_time=$(format_log_time "$time_format" "$time")
log_dir_tmp="${file_param##*/}"
if [[ $file_param =~ "/" ]]; then
if [[ $file_param == /* ]]; then
@@ -244,8 +245,8 @@ run_designated() {
[[ "$show_log" == "true" ]] && cmd=""
make_dir "$dir_log/$log_dir"
local begin_time=$(format_time "%Y-%m-%d-%H-%M-%S" "$time")
local begin_timestamp=$(format_timestamp "%Y-%m-%d-%H-%M-%S" "$time")
local begin_time=$(format_time "$time_format" "$time")
local begin_timestamp=$(format_timestamp "$time_format" "$time")
local envs=$(eval echo "\$${env_param}")
local array=($(echo $envs | sed 's/&/ /g'))
@@ -289,8 +290,8 @@ run_designated() {
run_else() {
local file_param="$1"
define_program "$file_param"
local time=$(date "+%Y-%m-%d-%H-%M-%S")
log_time="$time"
local time=$(date "+$time_format")
log_time=$(format_log_time "$time_format" "$time")
log_dir_tmp="${file_param##*/}"
if [[ $file_param =~ "/" ]]; then
if [[ $file_param == /* ]]; then
@@ -308,8 +309,8 @@ run_else() {
[[ "$show_log" == "true" ]] && cmd=""
make_dir "$dir_log/$log_dir"
local begin_time=$(format_time "%Y-%m-%d-%H-%M-%S" "$time")
local begin_timestamp=$(format_timestamp "%Y-%m-%d-%H-%M-%S" "$time")
local begin_time=$(format_time "$time_format" "$time")
local begin_timestamp=$(format_timestamp "$time_format" "$time")
eval echo -e "\#\# 开始执行... $begin_time\\\n" $cmd
[[ -f $task_error_log_path ]] && eval cat $task_error_log_path $cmd
@@ -354,6 +355,7 @@ main() {
timeoutCmd="timeout -k 10s $command_timeout_time "
fi
time_format="%Y-%m-%d %H:%M:%S"
if [[ $1 == *.js ]] || [[ $1 == *.py ]] || [[ $1 == *.sh ]] || [[ $1 == *.ts ]]; then
case $# in
1)
+4 -13
View File
@@ -1,14 +1,5 @@
export const version = '2.13.4';
export const changeLogLink = 'https://t.me/jiao_long/303';
export const changeLog = `2.13.4 版本说明
1. 增加系统token,防止未登录时无法更新仓库和任务状态
2. 脚本管理按照类型排序
3. 任务详情中编辑脚本支持全屏
4. 环境变量增加导出功能
5. 修复无法更新脚本内容为空
6. 修复停止node脚本报错
7. 修改手动停止任务耗时
8. 修复脚本管理、日志管理树
9. 修复获取环境变量详情
10. 区分原生termux和termux中安装的Linux发,感谢 erma0
export const version = '2.13.5';
export const changeLogLink = 'https://t.me/jiao_long/320';
export const changeLog = `2.13.5 版本说明
1. 修复task命令获取时间异常
`;