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

How to Reload an URL in CFScheduler

New Here ,
Jun 07, 2007 Jun 07, 2007

Copy link to clipboard

Copied

Hi I am very new to coldfusion. I have an application which retrieves data from an LDAP server and updates in another database. This application is working fine if i run it manually but is causing problems when called by a CFSCHEDULER. This program is running only for few minutes and stopping abruptly without throwing any error message. I am using CFLOCATION tag to reload the URL in the program. I cant use Javascript in this as CFSCHEDULER is unable to execute JS code so i tried using CFLOCATION. Can some one let me know why the process is halted after some time? Also please let me know what are the other tags that i can try to reload an URL other than CFLOCATION? Please help. Thanks in advance
TOPICS
Advanced techniques

Views

465

Translate

Translate

Report

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
LEGEND ,
Jun 07, 2007 Jun 07, 2007

Copy link to clipboard

Copied

The first question to make sure you have addressed is user permissions.
Whenever somebody says a tasks works when run directly by them, but
does not run correctly in as a scheduled task, nine times out of ten it
is permissions.

When you run the file your system/domain/network permissions are used.
When run as a scheduled task, the user assigned to the coldfusion
service is uses. This is the 'localsystem', user by default which no
permissions outside of the local system unless modified.

One way to debug what is going on is to make sure you have set up a file
to write output to in the schedule task form. Then look at this file to
see any error messages generated by running the task. Also output data
as the process runs so one can see what is going on when the task is run.

Votes

Translate

Translate

Report

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 ,
Jun 07, 2007 Jun 07, 2007

Copy link to clipboard

Copied

Hi Thanks for your quick response. I checked the scheduler log while running the application and it logged a message "302 Moved Temporarily" and this is the point exactly the process stopped. I also tried to output data while the process is running and it is printing the data exactly as expected. I suspect this might be caused because of CFLOCATION tag as the request went out of scope which i am not sure about. I increased the request timeout property through CFSETTING but it didn't make any difference. Can you please guide me what else i can try to fix this issue? Thanks in advance.

Votes

Translate

Translate

Report

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
LEGEND ,
Jun 08, 2007 Jun 08, 2007

Copy link to clipboard

Copied

You might have a problem with cfschedule "302 Moved Temporarily" is how
<cflocation...> works. I'm guessing that maybe the built in HTTP
processor-browser that CF uses may not do anything when it receives this
status.

Votes

Translate

Translate

Report

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 ,
Jun 08, 2007 Jun 08, 2007

Copy link to clipboard

Copied

Hi.. thanks for the information. I have another program that is running fine with out any issues when called from CFSCHEDULER. The problem occurs only for one program that retrieves data from the LDAP and uses CFLOCATION to reload the URL multiple times. This process is exactly stopping after 10 minutes even the requesttimeout property is set to a higher value. Timeout property in CFSCHEDULE also set to a maximum value. Can you please tell me if there is any option to check in the CFSCHEDULE to continue the process even after 10 minutes? Thanks in advance.

Votes

Translate

Translate

Report

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
Explorer ,
Jun 08, 2007 Jun 08, 2007

Copy link to clipboard

Copied

LATEST
I think Ian Skinner answered your question... You have to remember that the scheduler is just acting like a browser, a very limited browser, in this case and probably can't handle the 302.
I mentioned in your other post about possibly using wget or cURL if you really need the cflocation.

Votes

Translate

Translate

Report

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
Documentation