Hi Luis,
I am trying the solutions reported in your link Brian Pool and the file autouploadusers.php of michael-milette.
It works well run from a command line in DOS and even from the browser. Even the standard uploadusers.php works with parameters.
The problem remains though, as the site where I need to automate this is hosted by a provider in a multicustomer environment thus, they don't allow running it neither form command line nor from the browser.
They let me set a cron job to do it, but it does not work: I don't even get a result or log, nothing.
Is there a way to get something like a log to debug where it stucks ? The provider uses php 7.4 but eventually I can choose a higher version up to 8.0