cancel
Showing results for 
Search instead for 
Did you mean: 

Correct method and storage of interface

SOLVED

Correct method and storage of interface

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?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Correct method and storage of interface

Hi @kevin_marshall2 

 

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 ! 

if issue solved,Click Kudos & Accept as Solution

View solution in original post

1 REPLY 1

Re: Correct method and storage of interface

Hi @kevin_marshall2 

 

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 ! 

if issue solved,Click Kudos & Accept as Solution