I'm thinking of using scheduler to schedule new events to fire but only after a minute. I would create these new actions after an endpoint request and past the ID of the post i save the json. Currently I have my app working but processing the json data send via POST takes too long and returns 504 errors sometimes.
So I need to be able to upload the json then return success and then process the details. If anyone has another suggestion that would be better let me know.
as_schedule_single_action( $timestamp, $hook, $args, $group );
Arnav Joy answers:
can you please explain more about your requirement?
I have an android app that sends json data to a wordpress endpoint; I get the data and return success. However I also process json data sent and sometimes its so much data that it takes to long to finish and the server returns a 504 error to the app.
looking for some suggestion options on how to avoid the 504 while still being able to process the data; I'm thinking that AS will be that option.