Workaround for 5 minutes run limit for a button
By The Grace Of G-D.
Hi,
How are you all?
I Want to send SMS using API to all of the contacts in a custom view.
Now, i dont know how many it will contain and how long will it take.
Hence, i dont know to whom i have sent the SMS and who didnt fit in the 5 minutes run limit for a button.
I Can update a field in the contacts and filter them in the custom view but this requires the user use only the prebuilt custom view or update all the other custom views with this filter and i want it to be as seamless and easy as possible.
The current solution i thought of is:
- loop through the records with pagination
- Stop the script from running past 4.5 minutes
- Use a CRM Variable to save the page number that needs to start from next
- return an info message to the user that he needs to press the button again
- in the next script run, get the page number from CRM Variable
And so on...
I thought of another solution that i dont know if it will work:
- loop through the records with pagination
- Stop the script from running past 4.5 minutes
- Call another Standalone Function to continue the loop
- in the standalone function, use the same timer logic to call another Standalone function
Will it work?
Or the run time limit will stop the Standalone function after 5 minutes from the start of the first (button) function?