Menu Close
    Start a Project Request quote Reading list Switch to dark mode

    Here We Learn How To Setup Cron Job in Magento2

    Today Here We Learn How To Setup Cron Job in Magento2

    Step 1# : 1st we’ll create crontab.xml in app/code/NameSpace/Module/etc folder

    Step 2# Now we create class with method which  define in instance attribute of  crontab.xml file

    For this we create CustomClassName.php in app/code/NameSpace/Cron/ folder

    step3# after this you need to run following command from terminal

    so open ssh console and run following command from magento root folder

    thanks 🙂

    . . .

    Comment (1)

    Add Your Comment

  • brstdev3
    Hello Abhishek,

    Thanks for the post.
    Can we set more then one cron in a single module? or how we can set more then one cron.
    Please let me know as i want to add more then one cron in my module.


  • Back to Top
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again