Coldfusion计划任务不发送电子邮件

发布于 2024-12-01 06:41:00 字数 97 浏览 0 评论 0原文

当我们通过 CFAdmin 运行计划任务时,任务内用于发送电子邮件的代码不会发送该电子邮件。但是,如果我们在浏览器中单独运行任务 URL,则会发送电子邮件。有人遇到过类似的问题吗?

When we run a scheduled task through CFAdmin, code inside the task that is meant to send an email does not send that email. But, if we run the task url in a browser on its own, the email is sent. Anybody come across a similar issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

梨涡 2024-12-08 06:41:00

在没有看到任何实际代码的情况下很难说太多,但我可以在其他都很好的响应之上提出一些盲目的建议。

  • 如果通过 CFSCHEDULE 运行任务会发生什么?
  • 如果您创建一个仅执行该过程的电子邮件位的新任务(即:注释掉最后的所有其他内容,如果需要的话,硬编码值),会发生什么
  • 您检查了哪些日志以查找错误迹象?
  • 当您说通过 CFAdmin 运行任务时,您的意思是“单击运行任务按钮”,还是指它根据计划自动运行?听起来你的意思是前者,但并不是100%清楚,所以我想我会问。
  • 您是否使用过服务器监视器或 FusionReactor 或其他东西来观察任务运行时幕后发生的情况?
  • 您是否在脚本中放入了一些 CFLOG 条目,以查看它是否在进程中的某个特定点死亡,或者是否发生了一些意外的逻辑,这意味着电子邮件代码永远不会被执行,或者其他什么?
  • 您能否列出您自己采取的故障排除步骤,以尽量减少人们提出的盲目建议的数量

(抱歉,这不是真正的“答案”,但我认为对于“评论”来说太长了)。

反馈一些更好的信息,我们可以从那里开始......

It's difficult to say too much without seeing any actual code, but I can make some blind suggestions over and above the other responses which are all good.

  • what happens if you run the task via CFSCHEDULE?
  • what happens if yuo create a new task that ONLY does the email bit of the process (ie: comment-out everything else in the last, hard-coding values if need be)
  • which logs have you checked for signs of errors?
  • when you say you run the task via CFAdmin, do you mean "clicking the run task button", or do you mean that when it's run automatically according to its schedule? It sounds like you mean the former, but it's not 100% clear, so I figured I'd ask.
  • have you used the server monitor or FusionReactor or something to watch what's going on under the hood when the task runs?
  • have you put some CFLOG entries into the script to see if it's dying at some particular point in the process, or whether there's some unexpected logic occurring that means theemailing code never gets executed, or something?
  • can you list what troubleshooting steps you yourself have taken so as to minimise the number of blind suggestions people make

(sorry, this isn't really an "answer", but it's too long for just a "comment" I think).

Feed back some better info, and we can go from there...

柠檬色的秋千 2024-12-08 06:41:00

我猜测当您通过浏览器运行任务时,您已经以不同的方式对您的应用程序进行了身份验证,这就是它在浏览器中运行的原因 - 即您有一个正确的会话。

如果您更新计划任务以采取其他操作(例如写入日志文件),这有效吗?我认为问题不在于电子邮件,而在于流程的其余部分。

I'm guessing that when you run the task through a browser that you have authenticated to your app differently and that's why it runs in the browser - ie you have a proper session.

If you update your scheduled task to take some other action - eg write to a log file - does that work? I think the problem is not with the email but with the rest of the process.

两相知 2024-12-08 06:41:00

您需要检查计划任务的以下步骤

  • 检查日志
  • 检查间隔时间
  • 检查计划任务的超时问题(如果分配)

You need to check following steps for your schedule task

  • check the log
  • check the interval time
  • check timeout issue of your schedule task if you assign it
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文