Scheduled task request requires headers

Hi
I suspect I know the answer to this is “nope”, but I’ll pick ppl’s brains if poss anyhow.

Tasks take a URL which is then requested etc. Generally in my experience in the past these URLs have always been back to the CFML application itself, and it’s more a case of “CFML code is called via an HTTP request, this is just how it works”, rather than it specifically being a feature “you can curl a URL as a task”, if you see the difference.

I have a task-running requirement that is indeed request-based, but its URL is to a different app, and the endpoint requires me to pass an authorization header.

There doesn’t look to be a way to do this with <cfschedule> (or indeed by slinging an entry into scheduler.xml, which is what we are doing).

Can I confirm my suspicions are correct - it can’t be done - and I’m not missing anything?

Answers that involve anything with “box” in the name cannot help me here, I’m afraid.

Cheers.


Adam

I think you are unfortunately right. The only thing I see in the source code is the use of a proxy which could possibly decorate it with the auth header.

I know Micha is working on many improvements to this.

Without going the “box” route there is the Task Extension: Download Lucee
Which will run a CFC every X seconds and you could then do your HTTP call but nothing in plain ole cfschedule.

Yeah cool. We actually have a CFML wrapper on the call anyhow, but I was hoping to get rid of the wrapper.

Thanks for checking mate.

I just noticed this new repository yesterday:

1 Like

Oooh lucee 7 extension!!