qinglong icon indicating copy to clipboard operation
qinglong copied to clipboard

task_before为什么只在手动执行脚本才能生效。定时运行的时候不会执行task_before

Open o2ol opened this issue 1 year ago • 1 comments

Qinglong version

all

Steps to reproduce

task_before为什么只在手动执行脚本才能生效。定时运行的时候不会执行task_before

What is expected?

希望定时运行的时候也能自动运行task_before

What is actually happening?

定时运行的时候不会执行task_before

System Info

No response

Any additional comments?

No response

o2ol avatar Aug 22 '24 09:08 o2ol

无法复现

whyour avatar Aug 28 '24 15:08 whyour

task_before 是不是换行写的?

whyour avatar Aug 31 '24 12:08 whyour

task_before 是不是换行写的?

搞明白了,js脚本的只能在task_before.js中写,定时执行才会自动执行task_before.js. py脚本的只能在task_before.py中写,定时执行才会自动执行task_before.py

我之前都是在task_before.sh中写的,导致定时任务不自动执行task_before.sh,手动点击运行任务才会执行task_before.sh

o2ol avatar Sep 03 '24 06:09 o2ol

@o2ol task_before.sh 不管是 js 还是 py 是都会执行的,最新版 task_before.sh 里的代码也不执行?要不改成 6 位定时,看看系统日志

whyour avatar Sep 03 '24 08:09 whyour

搞定了,原因是因为我没有获取到当前运行的脚本,导致没匹配上,所以没执行sh后面的代码!非常感谢!

o2ol avatar Sep 03 '24 08:09 o2ol