{"id":2761,"date":"2020-05-24T03:24:49","date_gmt":"2020-05-24T08:54:49","guid":{"rendered":"https:\/\/www.emizentech.com\/blog\/?p=2761"},"modified":"2022-01-21T11:43:55","modified_gmt":"2022-01-21T11:43:55","slug":"run-cron-magento-2","status":"publish","type":"post","link":"https:\/\/multisitelocal.ezxdemo.com\/blog\/run-cron-magento-2.html","title":{"rendered":"How To Configure and Run Cron In Magento 2"},"content":{"rendered":"<p>Magento Recommends 3 type of cron are introduced in Magento-2 as given below<\/p>\n<p><code class=\"d-block\">*\/1 * * * * php -c \/path\/to\/magento2\/bin\/magento cron:run<br \/>\n*\/1 * * * * php -c \/path\/to\/magento2\/bin\/magento\/update\/cron.php<br \/>\n*\/1 * * * * php -c \/path\/to\/magento2\/bin\/magento setup:cron:run<\/code><\/p>\n<p>but we do not need to configure all of them,<\/p>\n<p>1st cron command will work for reindexes indexers, send automated e-mails, generates the sitemap, and so on.<br \/>\nrest 2 cron commands are used by the Component Manager and System Upgrade.<\/p>\n<p>To configure CRON, edit crontab command line<br \/>\n<code class=\"d-block\">crontab -u magento_user -e<\/code><\/p>\n<p>add this line at the end of file<br \/>\n<code class=\"d-block\">* * * * * php -c \/path\/to\/magento2\/bin\/magento cron:run<\/code><br \/>\n# this will run every minute<\/p>\n<p>if you do not want every minute you can set every 5 min as given below:<br \/>\n<code class=\"d-block\">*\/5 * * * * php -c \/path\/to\/magento2\/bin\/magento cron:run<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magento Recommends 3 type of cron are introduced in Magento-2 as given below *\/1 * * * * php -c \/path\/to\/magento2\/bin\/magento cron:run *\/1 * * * * php -c \/path\/to\/magento2\/bin\/magento\/update\/cron.php *\/1 * * * * php -c \/path\/to\/magento2\/bin\/magento setup:cron:run but we do not need to configure all of them, 1st cron command will work for<\/p>\n","protected":false},"author":35,"featured_media":2748,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"MSN_Categories":"Uncategorized","MSN_Publish_Option":false,"MSN_Is_Local_News":false,"MSN_Is_AIAC_Included":"Empty","MSN_Location":"[]","MSN_Add_Feature_Img_On_Top_Of_Post":false,"MSN_Has_Custom_Author":false,"MSN_Custom_Author":"","MSN_Has_Custom_Canonical_Url":false,"MSN_Custom_Canonical_Url":"","_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[78],"tags":[],"class_list":{"0":"post-2761","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-magento"},"modified_by":"emizentech","featured_image_src":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-content\/uploads\/sites\/2\/2020\/05\/How-To-Configure-and-Run-Cron-In-Magento-2-1.png","featured_image_src_square":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-content\/uploads\/sites\/2\/2020\/05\/How-To-Configure-and-Run-Cron-In-Magento-2-1.png","author_info":{"display_name":"Amit Samsukha","author_link":"https:\/\/multisitelocal.ezxdemo.com\/blog\/author\/amit"},"_links":{"self":[{"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/posts\/2761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/comments?post=2761"}],"version-history":[{"count":0,"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/posts\/2761\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/media\/2748"}],"wp:attachment":[{"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/media?parent=2761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/categories?post=2761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/tags?post=2761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}