Skip to main content
dk22197913
Inspiring
June 17, 2023
Question

Cfschedule url and httprequest

  • June 17, 2023
  • 1 reply
  • 932 views

We have 100+ application, and we use Unix crontab to run jobs, basically it call the CF URL and executes the .CFM page at the scheduled time. I'm trying to move cron jobs into CF and eliminate 3rd party system.

 

I'm using CF CFschedule function to set properties and the URL of the page I want to execute. The issue I came across is the authentication. We have apps with different auth types, Azure, Shibboleth, AD and any call to the page returns 200, but it does not call the page. It due to the prompt to authenticate. Is there a way for task to call the scoped pages outside the authentication? I'm trying to avoid managing the special account and dealing with login and tuh issues for 100+ apps just to execute tasks.

 

          cfschedule(action="update",
                          task="Reminder4ToDo",
                          operation="HTTPRequest",
                          url="https://coldfusionsrvr.example.com/apps/myapp/runtodoreminder.cfm",
                          mode="application",
                          interval="daily",
                          group="default",
                          eventHandler=pathToEventHandlerCfc,
                          startDate="06/16/2023",
                          starttime="20:24",
                          cluster="yes" );

 

 

 

Thanks

    This topic has been closed for replies.

    1 reply

    Community Expert
    June 21, 2023

    There's a hack of sorts for this: set up a secondary web server that can only be accessed from the same machine via localhost/127.0.0.1 and run those tasks on that web server via CFSCHEDULE.

     

    Dave Watts, Eidolon LLC

    Dave Watts, Eidolon LLC
    dk22197913
    Inspiring
    June 23, 2023

    Thanks Dave for suggestion. We figured out few ways of solving this problem, hopefully we'll be able to implemented it. Thank you