Link to home
Start Free TrialLog in
Avatar of csaexperts
csaexpertsFlag for United States of America

asked on

Scheduled task fails in Coldfusion

I have a coldfusion page that uses cfmail to send messages upon opening.  The page works if I manually open it.  I have tried to run the page as a scheduled task using Coldfusion Administrator.  I do get a message in the scheduler.log when the task is triggered, but no mail is sent (telling me the task failed).

Any suggestions?

JK
Avatar of erikTsomik
erikTsomik
Flag of United States of America image

make sure that smtp is setup on your server
erikTsomik might be right.

But honestly... I did not understand your question. When you say "The page works if I manually open it.", do you mean email gets sent?

Or you are talking about error handling page that is supposed to send messages to you when the other page fails? Please clarify your question. Provide code snippet.

BTW, does your page require login... Because if it does that would explain why it works when you open it manually and not from cfchedule. But again - I'll stop guessing - I did not understand what you are asking.
Are you expecting an email when the task has failed or when it has processed correctly?
What does the message in the schedule log actually say?
Have you checked the mail logs and the undelivr folder?

Have you tried adding cflog tags to your task, so that the steps in the process are sent to a custom log file in the CF Admin?



Do you need a password to get to that page on the server (eg  .htaccess )?  if so you'll need to set the authentication details for the scheduled task.  it's easy to forget that your browser is automatically sending your username and password.

ASKER CERTIFIED SOLUTION
Avatar of csaexperts
csaexperts
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You haven't answered a single question coming from people who tried to help you. Was it password protected folder where script resided originally?