5 Replies Latest reply on Jun 8, 2007 8:39 AM by tmschmitt

    How to Reload an URL in CFScheduler

      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
        • 1. Re: How to Reload an URL in CFScheduler
          Level 7
          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.
          • 2. Re: How to Reload an URL in CFScheduler
            Krish2007 Level 1
            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.
            • 3. Re: How to Reload an URL in CFScheduler
              Level 7
              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
              • 4. Re: How to Reload an URL in CFScheduler
                Krish2007 Level 1
                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.
                • 5. Re: How to Reload an URL in CFScheduler
                  tmschmitt Level 1
                  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.