1 Reply Latest reply on Oct 8, 2013 4:50 AM by tomarse

    cfschedule on multi instance server


      Hi All


      Hope someone can help me on this. We run a multi instance CF server with 3 "slave" instances, which handle the site requests and the CFusion instance that handles the scheduled tasks.


      The application I'm writing has a few scheduled tasks that need setting up each time it gets installed and it is installed multiple times for a variety of clients. So far, this has been done either manually setting them up individually on the CFusiion instance or I created an admin menu extension that fires them off (Knowing the <cfschedule> is being run on CFusion, thus installing them to that instance).


      My question however is; it would much more efficient if the application could check for the existence of the scheduled task and if it's not there, install them. The problem though is as the request would be coming from initial install, thus a web request, it would be coming from one of the "Slave" instances and install the scheduled tasks to them = bad. Is there any way to direct a specific request or point <cfschedule> to install on specific instance of ColdFusion?


      Checking for the existance on the CFusion instance is easy, I can read:




      But then directing the request seems to be impossible in this way.


      I am running CF9.0.1 on a Windows 2008 Server box with IIS7.5


      Hopefully somone may be able to help


      Thanks in advance



        • 1. Re: cfschedule on multi instance server
          tomarse Level 1

          No one? Bueller? Bueller?


          OK, so I may have come up with a solution, I'm just not sure how elegant it is:


          I have a seperate install.cfm that handles the scheduled task creation. The file that gets included on application start now moves this install.cfm to the /cfide directory and then does a cfhttp call to it on ... which is bound to the cfusion instance ... thus installing the schedule tasks to the correct instance and making my OCD happy. The file is then deleted once the cfhttp returns correct setup.


          Does the job, but as I say, doesnt seem to be the most elegant of ways.