Openshift: manage cron processes

杀马特。学长 韩版系。学妹 提交于 2019-12-13 02:25:12

问题


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.

I write a little test:

<?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:

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

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

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


回答1:


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.



来源:https://stackoverflow.com/questions/27867553/openshift-manage-cron-processes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!