【问题标题】:CronJob on EC2 not workingEC2 上的 CronJob 无法正常工作
【发布时间】:2014-01-04 16:23:21
【问题描述】:

我已经在我们之前的 LiquidWeb LAMP 堆栈中使用了这些 cronjobs,它运行良好。现在在我们的新 AWS 设置中,它根本无法工作。

*/1 * * * * /usr/bin/curl --silent --compressed http://website.com/reader.php
*/1 * * * * /usr/bin/curl --silent --compressed http://website.com/process/
*/1 * * * * /usr/bin/curl --silent --compressed http://website.com/subscription/instagramtag
*/1 * * * * /usr/bin/curl --silent --compressed http://website.com/subscription/twittertag
*/1 * * * * /usr/bin/curl --silent --compressed http://website.com/subscription/cron_follow
*/30 * * * * /usr/bin/curl --silent --compressed http://website.com/subscription/report/
*/1 * * * * /usr/bin/curl --silent --compressed http://www.website.com/subscription/twitter

我知道这些脚本可以工作,没有 PHP 错误,而且很明显 website.com 不是真实地址。是因为我们在一个微实例上吗?我是不是服务器超载了?

【问题讨论】:

  • 更正,第一个脚本运行良好。
  • 系统日志是怎么说的
  • 有什么错误吗?检查你的邮件。
  • 为什么不通过命令行调用文件php file.php

标签: php amazon-web-services amazon-ec2 cron


【解决方案1】:

想通了,这是所有 SSL 证书的问题,这些证书是作为 https 而不是 http 运行的,我在 -k 中添加了它们,它们都有效。谢谢大家:)

【讨论】:

  • Dagon,我没有使用 php file.php 因为这是一个 CodeIgniter 站点,并且脚本是通过 URL 调用的
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-07-13
  • 2018-12-21
  • 2017-06-13
  • 2012-07-12
  • 2019-02-16
  • 1970-01-01
  • 2018-06-23
相关资源
最近更新 更多