php - Trigger self-execution in autonomous task
I have a file 'example.php' and it's execution time may vary. It needs to be executed as often as possible and as fast as possible. Therefore I'd like to trigger itself after successful execution. (without using cronjobs) I wouldn't like to run multiple, independent instances of 'example.php' either.
If I used something like header('example.php') or file_get_contents('example.php'), I needed to take care about max_execution_time, maybe even buffer sizes etc. as it would be interpreted as a single, never-ending execution task, right?
So what I'm looking for is something like the go function in Golang. Just execute 'example.php' and exit/move on. Ideally 'example.php' would be executed as an autonomous task like it was triggered from a cronjob/user.
What is best practice in this case? Thank you in advance.