I want to send an Email through a cron job for every 24hrs once.In that email need to mention all the abandoned cart details. I am new to Cron jobs so can you please explain it. Thanks in advance

1 Answer 1


create new module Vendor_Module

create a new file crontab.xml at this location:


and insert below code

enter image description here

create new file Customemail.php at the location:


and code as below


namespace Vendor\Module\Cron;

class Customemail

    public function execute()

        //send custom mail


try this solution

  • Thank You Mohit .Not i got an idea about cron.
    – Jinitha
    Commented Sep 21, 2018 at 10:04
  • Can you provide the execution code ? I need that. Commented Aug 31, 2020 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.