Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

ColdFusion 11 Scheduled Task Email

New Here ,
May 11, 2015 May 11, 2015

Sending email using cfmail doesn't work in scheduled task but it works from a page when accessed through the browser.

569
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , May 11, 2015 May 11, 2015

You might want to go into the server and see if you can call that url on the local server.  Also, check the logs and see if there are any errors.

Translate
Engaged ,
May 11, 2015 May 11, 2015

Can you offer some more information on your issue?  Can you provide any code showing the issue you are seeing?  Also, are you sure the scheduled task is actually firing?

Thanks,

--Dave

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
May 11, 2015 May 11, 2015

As well as what is mentioned above, check your logs as well. The coldfusion-out.log may show you the reason as to why it is not working.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 11, 2015 May 11, 2015
1216 May 11, 2015 15:35:26 PM Information [ajp-apr-8014-exec-2] - [Insert Daily Plan Numbers] Executing because of user request at Mon May 11 15:35:26 CDT 2015
1217 May 11, 2015 15:35:26 PM Information [DefaultQuartzScheduler_Worker-1] - Task default.Insert Daily Plan Numbers triggered.
1218 May 11, 2015 15:35:26 PM Information [DefaultQuartzScheduler_Worker-1] - Starting HTTP request {URL='http://coldfusion/plan_reportDaily.cfm', method='get'}

This is from the log.  Looks like it fired but I don't get an email.  Also, even though my data source is connected to my dev sql server db, it is inserting/updating the production one.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 11, 2015 May 11, 2015

You might want to go into the server and see if you can call that url on the local server.  Also, check the logs and see if there are any errors.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 12, 2015 May 12, 2015
LATEST

There are no errors in the logs.  First problem is that the url inserts into the wrong database even though the datasource is set up correctly.  Second problem is that the email is sent when calling the url from the browser but not from the scheduled task. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources