问题
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