Redhat openshift - Cron运行时 - 有一个默认时间,cron执行多长时间 [英] Redhat openshift - Cron Runtime - Is there a default time for how long cron executes

查看:140
本文介绍了Redhat openshift - Cron运行时 - 有一个默认时间,cron执行多长时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Cron on Redhat openshift在几分钟后被SIGTERM取消。

Cron on Redhat openshift is cancelled by SIGTERM after some minutes.

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

Is there a default timeout on how long cron tasks can execute? If yes, how to get long running tasks working?

推荐答案

解决方案是使用nohup来使长时间运行的任务工作。

The solution is to use "nohup" to get long running tasks working.

例如:

档案.openshift / cron / minutely / task1 -

File .openshift/cron/minutely/task1 -

nohup /path-to/some-other-script > $OPENSHIFT_LOG_DIR/logfile 2>&1 &

这篇关于Redhat openshift - Cron运行时 - 有一个默认时间,cron执行多长时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆