支持非js任务随机延迟 (#1580)

* 修复非JS任务不能随机延迟的问题
This commit is contained in:
景大侠
2022-08-26 17:11:16 +08:00
committed by GitHub
parent 32eec68278
commit d2590edab3
3 changed files with 38 additions and 11 deletions
+5 -1
View File
@@ -298,7 +298,11 @@ export default class CronService {
if (!cmdStr.includes('task ') && !cmdStr.includes('ql ')) {
cmdStr = `task ${cmdStr}`;
}
if (cmdStr.endsWith('.js')) {
if (cmdStr.endsWith('.js')
|| cmdStr.endsWith('.py')
|| cmdStr.endsWith('.pyc')
|| cmdStr.endsWith('.sh')
|| cmdStr.endsWith('.ts')) {
cmdStr = `${cmdStr} now`;
}