Redhat openshift - Cron Runtime - cron执行的时间是否有默认时间

Sus*_*ish 3 cron redhat openshift

几分钟后,Cron on Redhat openshift被SIGTERM取消.

cron任务可以执行多长时间的默认超时?如果是,如何让长时间运行的任务工作?

Sus*_*ish 5

是的,在Redhat openshift上执行cron任务时,顶级脚本显然有5分钟的默认超时.

解决方案是使用"nohup"来使长时间运行的任务正常工作.

例如:

文件.openshift/cron/minutely/task1 -

nohup /path-to/some-other-script > $OPENSHIFT_LOG_DIR/logfile 2>&1 &
Run Code Online (Sandbox Code Playgroud)