Openshift:管理cron进程 [英] Openshift: manage cron processes

查看:140
本文介绍了Openshift:管理cron进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在openshift框中设置我的项目和一个cron文件,项目运行确定,但由于某种原因,我不能管理cron运行的进程,我甚至不能列出他们,如果我通过ssh连接,

I've setup my project and a cron file inside an openshift box, the project runs ok, but for some reason I can't manage cron running processes, I can't even list them, if I connect via ssh and exec 'ps aux' the cron process doesnt even appear.

我写了一个小测试:

<?php
    file_put_contents('../../b.log','pid: '.getmypid().PHP_EOL,FILE_APPEND);
    file_put_contents('../../b.log',shell_exec('whoami'),FILE_APPEND);

cat b.log:

cat b.log:

pid: 194061
54ae4f424382ec439100xxxx //the user is right, the cron process is running behind the same user

whoami从ssh同样的用户,但如果我尝试达到的过程,我得到:

whoami from ssh spits the same user, but if I try to reach the process I get:

ls /proc/194061
ls: no se puede acceder a /proc/194061: Permiso denegado //Permission denied

该进程存在,因为/ proc / 19406 [TAB]完成,我看到日志文件填充,但我不能通过ssh或通过web检查进程是否真正运行:S


the process exists because /proc/19406[TAB] completes and I see the log files populating but I cant check if the process is really running or not via ssh or via web :S

推荐答案

Cron进程只运行一段时间,然后停止,它们不会连续运行。如果您的cron进程正确更新了该文件,则它会正确运行。

Cron processes only run for a short time and then stop, they do not run continuously. If your cron process updates the file correctly, then it ran correctly.

这篇关于Openshift:管理cron进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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