Method Community

 

Run Function using External Cron

Last post 11-16-2022 12:53 PM by Pedalo. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-14-2022 2:05 PM

    • Pedalo
    • Not Ranked
    • Joined on 11-14-2022
    • Posts 4

    Run Function using External Cron

    Hi All,

    I'm looking to run a function on a scheulde within Method. using an external cron.

    I can see there are options to run a function behind the load event of a webform, but wanted something more stable off the back of an extenrnal scheduled job through the Method API.

    From what I can see in the forum and the API documentation, it's only possible to update tables as a normal API is designed, so I have the following questions if anyone is able to help with their experience.

    1 - Is it possible to fire a function from the API?

    2 - If the answer to #1 is no, is anyone running functions in Method from an external cron?

    3 - I've tried hitting a webform using wget and cURL but it doesn't trigger the 'on load' function that gets fired when it's loaded using a browser.

    Before I configure Selenium, is there an easier (or more stable) route to take?


    Thanks to anyone that can help

  • 11-16-2022 8:54 AM In reply to

    Re: Run Function using External Cron

    Hey Pedalo,

    Unfortunately, at this time, you cannot trigger functions in Method VIA the API. If you are looking to run a routine on a schedule, have you considered using app routines? They work the same as regular functions but can be scheduled to run whenever you need them to. Let me know if that is more what you are looking for or if there is another use case we are not capturing correctly now.

    Thank you

    Mamoon Syed
    Product Manager
    Method Integration Inc.
  • 11-16-2022 12:53 PM In reply to

    • Pedalo
    • Not Ranked
    • Joined on 11-14-2022
    • Posts 4

    Re: Run Function using External Cron

    Hi Mamoon, thanks for the suggestion.

    Yes I have tried the app routines but it is no where near often enough for what I need.

    If I were able to set a schedule for example every 10 minutes, that would do it, but the ~3 hour window is not going to do it.

    The use case is with the timer function so I require a regular check to see if ca timer has breached a client threshold allowed.  As there isn't an event while a timer is running there isn't anything to trigger the check. When the threshold is breached, an email would be sent to the operative.

    Is there anything else that might hack that?

    Thanks

    Pedalo

Page 1 of 1 (3 items)