diff --git a/back/services/cron.ts b/back/services/cron.ts index 0c78b237..2f27e7ac 100644 --- a/back/services/cron.ts +++ b/back/services/cron.ts @@ -279,7 +279,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`; } diff --git a/shell/task.sh b/shell/task.sh index aadfa532..7ac59def 100755 --- a/shell/task.sh +++ b/shell/task.sh @@ -371,7 +371,7 @@ main() { fi time_format="%Y-%m-%d %H:%M:%S" - if [[ $1 == *.js ]] || [[ $1 == *.py ]] || [[ $1 == *.sh ]] || [[ $1 == *.ts ]]; then + if [[ $1 == *.js ]] || [[ $1 == *.py ]] || [[ $1 == *.pyc ]] || [[ $1 == *.sh ]] || [[ $1 == *.ts ]]; then case $# in 1) run_normal "$1"