Copy link to clipboard
Copied
Sending email using cfmail doesn't work in scheduled task but it works from a page when accessed through the browser.
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.