Solved

Scheduled task fails in Coldfusion

Posted on 2008-10-23
6
358 Views
Last Modified: 2013-12-24
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
0
Comment
Question by:csaexperts
6 Comments
 
LVL 19

Expert Comment

by:erikTsomik
Comment Utility
make sure that smtp is setup on your server
0
 
LVL 8

Expert Comment

by:eszaq
Comment Utility
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.
0
 
LVL 10

Expert Comment

by:Mr_Nil
Comment Utility
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?



0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 3

Expert Comment

by:andrewlorien
Comment Utility
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.

0
 

Accepted Solution

by:
csaexperts earned 0 total points
Comment Utility
The only way I was able to get this to function was to put the page into a different folder on the server.  Don't know if it mattered which folder it was.  It is working now.
0
 
LVL 8

Expert Comment

by:eszaq
Comment Utility
You haven't answered a single question coming from people who tried to help you. Was it password protected folder where script resided originally?
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

New Relic: Our company recently started researching several products to figure out what were the best ways for us to increase our web page speed and to quickly identify performance problems that we may be having. One of the products we evaluated wa…
Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now