Why do not you want create an extension for the task?
I recommend this approach because it is official, reliable, ans sustainable way to extend Magento.
If the import need to be executed regularly by a schedule, then I recommend to follow the instruction How can an extension schedule a cron job with a crontab.xml
file?
If you need an ability to execute the import not only by a schedule, but by a manual console command too, then you can place your import cron job into a custom execution group and then you can run cron for the single execution group.
Also, an extension can add a custom console command and handle it.
In the most complex scenarios you can setup Magento 2 as an OAuth server and use a web api to update the store’s stock.