BTW, it doesn't matter if I use a cf ajaxproxy or I use jquery.
Haxtbh is right. Funnily enough, the title of your thread is itself the answer: "cfajax and jquery json - runs in browser but not scheduler".
If that's the case, is there a product/solution?
You can use <cfinvoke> - https://wikidocs.adobe.com/wiki/display/coldfusionen/cfinvoke
<cfinvoke component = "cciBridgeServices.cfc" method = "testThis" returnVariable = "result"> <cfinvokeargument name="testtext" value="someText"> </cfinvoke>
Or something like CreateObject - CreateObject: component object - ColdFusion, English documentation - Adobe Learning Resources
<cfset comp = CreateObject('component','cciBridgeServices.cfc')> <cfset result = comp.testThis('someText')>
I appreciate that question haxtbh. The answer may lie in a basic misunderstanding on my part that I need to be educated on (so please be kind). Keep in mind that this is a very small and targeted sample of a much larger application...the sample program is only designed to point out the problem.
All of this works fine interactively My task now is to take this interactive process, add some default inputs to the form, and run it periodically via a scheduler.
I replied "to original discussion" I don't know if you get notified that way, so I'm just "poking" you.
Are the inputs required for task different all the time? You can pass variables through the task URL to the server side code or store them in a database to be read when the task executes. What you are needing to do is remove all the interactive stuff and leave just your coldfusion code.
For example, you could run the interactive process as normal but instead create a task that calls your coldfusion page with all the table updates etc rather then calling this page directly. This will then be run initially for the first time and then scheduled for a future time.
The other issue I will have to address when I'm looking at my code is to ensure I don't have any SESSION variables.
My basic misunderstanding was that scheduler was server-side only. I was thinking that it emulated a browser.
I thank you for your help and patience.
Then I'm not seeing the answer. I thought the scheduler (or wget) runs a url (a web page).
Just in case someone else stumbles across this and finds it helpful...
It might also be helpful to know that you don't have SESSION variables BUT, if the CLIENT variables are stored in a database rather than cookies (an CF is set up to allow them), you do have access to THOSE.