I am currently writing an interface between Magento2 and Ostendo and have a couple of questions.
I have written a controller but not sure if this is the correct way to do it?
Currently is is being stored in app/code, should it be somewhere else?
How would I call it from a cron job?
How would I send it arguments?
Solved! Go to Solution.
Yes you have written your custom module and its controller in app/code directory - so that is perfectly correct and even it is best practice to create custom module in the app/code directory.
Moving forward on your other questions, i would suggest you to see/read few blogs for create custom module with cron job setup so you will get better idea how exactly it will works
Following i am sharing few links which helps you to achieve the same.
https://devdocs.magento.com/videos/fundamentals/create-a-new-module/
https://devdocs.magento.com/guides/v2.3/config-guide/cron/custom-cron-tut.html
https://www.mageplaza.com/devdocs/magento-2-create-cron-job/
Hope it helps !
Yes you have written your custom module and its controller in app/code directory - so that is perfectly correct and even it is best practice to create custom module in the app/code directory.
Moving forward on your other questions, i would suggest you to see/read few blogs for create custom module with cron job setup so you will get better idea how exactly it will works
Following i am sharing few links which helps you to achieve the same.
https://devdocs.magento.com/videos/fundamentals/create-a-new-module/
https://devdocs.magento.com/guides/v2.3/config-guide/cron/custom-cron-tut.html
https://www.mageplaza.com/devdocs/magento-2-create-cron-job/
Hope it helps !