Slim 3 console execution for cron
问题 I'm trying to create some kind of import to move database info and transform data. In the future this import needs to be executed by cron every day. I want to use part of my written code and reuse some models and controllers. To do this I'm trying to call Slim 3 through the command line, but I have some problems. console command: php cli.php import I don't know how to process argv correctly. cli.php: require __DIR__ . '/vendor/autoload.php'; if (PHP_SAPI == 'cli') { $argv = $GLOBALS['argv'];