dongtaochan0777 2015-01-23 18:26
浏览 35
已采纳

定时bashed(at)运行但抛出错误

I have a command line app in which I need to implement some kind of scheduler to run a script once after execution of the first script.

Now, I'm trying to run a script a minute after execution time, with this directive:

$dir = getcwd().'/';

    exec('echo '.$dir.'./prices get:inventorylist '.database_connector::getUserId().' '.database_connector::getLand().' --reportId="'.$this->reportRequestId.'" | /usr/bin/at now + 1 min');

When trying to run this without echo and | /usr/bin/at now + 1 min it's running perfectly fine without throwing any errors, I've also checked if at is working, and it should be fine.

Well, actually, the script is getting executed after the given additional time, but I keep getting this error in syslog:

Jan 23 19:09:01 atd[6792]: Exec failed for mail command: No such file or directory.

I can't understand this error, as, as I mentioned above, the script is running and the directive is running without any problems or errors when I run it without at.

Is there something I don't see why this error could be possibly thrown?

  • 写回答

1条回答 默认 最新

  • drip5880 2015-01-23 18:49
    关注

    Are you missing /usr/sbin/sendmail or something perhaps?

    That error is at telling you it couldn't send mail with the output of the command it ran I believe.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 Web.config连不上数据库
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退
  • ¥20 win系统的PYQT程序生成的数据如何放入云服务器阿里云window版?
  • ¥50 invest生境质量模块