dqyl2374 2014-07-25 20:35
浏览 51

crons无缘无故地停下来

Well this isn't true, I'm sure there's a reason, but I can't find it!!

I have a script that can take around 10 minutes to execute. It does a lot of communicating with an api on a service that we have that use. It pulls a bit of a fingerprint of everything every 24 hours. So what it's doing is pretty aside from the point. the probm I'm finding is the script stops executing somewhat randomly!!

I can't find any errors that would cause my script to stop executing, even with

//for debugging
error_reporting(E_ALL);
ini_set('display_errors', '1');

on for debugging, it's all clean. I've also used

set_time_limit(0);

so that it shouldn't ever time out.

With that said, I'm not sure how to get any more debug info to figure out what it's stopping. I can say that the script should NOT be hitting any memory limits or anything. I mean that should throw an error, and I've gone through and cleaned this script up as much as I can see to clean it up.

So my Question is: What are common causes for a cron ending when it shouldn't? How can I debug this more effectively?

  • 写回答

2条回答 默认 最新

  • duanli0453 2014-07-25 20:37
    关注

    What are common causes for a cron ending when it shouldn't?

    The most common in my experience is that the cron user has different permissions or different environment variables than the way that you're executing it from the command line.

    Make your cronned program dump its environment to a temporary file and see if it's what you expect.

    评论

报告相同问题?

悬赏问题

  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 Revit2020下载问题
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 单片机无法进入HAL_TIM_PWM_PulseFinishedCallback回调函数
  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线