qinglong
qinglong copied to clipboard
task_before为什么只在手动执行脚本才能生效。定时运行的时候不会执行task_before
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
无法复现
task_before 是不是换行写的?
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 task_before.sh 不管是 js 还是 py 是都会执行的,最新版 task_before.sh 里的代码也不执行?要不改成 6 位定时,看看系统日志
搞定了,原因是因为我没有获取到当前运行的脚本,导致没匹配上,所以没执行sh后面的代码!非常感谢!