{"id":2761,"date":"2020-05-24T03:24:49","date_gmt":"2020-05-24T08:54:49","guid":{"rendered":"https:\/\/emizentech.com\/blog\/?p=2761"},"modified":"2025-01-02T13:27:56","modified_gmt":"2025-01-02T13:27:56","slug":"run-cron-magento-2","status":"publish","type":"post","link":"https:\/\/emizentech.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":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[78],"tags":[],"class_list":["post-2761","post","type-post","status-publish","format-standard","has-post-thumbnail","category-magento"],"jetpack_featured_media_url":"https:\/\/emizentech.com\/blog\/wp-content\/uploads\/sites\/2\/2020\/05\/How-To-Configure-and-Run-Cron-In-Magento-2-1.png","featured_image_src":"https:\/\/emizentech.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:\/\/emizentech.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:\/\/emizentech.com\/blog\/author\/amit"},"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/emizentech.com\/blog\/wp-json\/wp\/v2\/posts\/2761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/emizentech.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/emizentech.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/emizentech.com\/blog\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/emizentech.com\/blog\/wp-json\/wp\/v2\/comments?post=2761"}],"version-history":[{"count":1,"href":"https:\/\/emizentech.com\/blog\/wp-json\/wp\/v2\/posts\/2761\/revisions"}],"predecessor-version":[{"id":44774,"href":"https:\/\/emizentech.com\/blog\/wp-json\/wp\/v2\/posts\/2761\/revisions\/44774"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/emizentech.com\/blog\/wp-json\/wp\/v2\/media\/2748"}],"wp:attachment":[{"href":"https:\/\/emizentech.com\/blog\/wp-json\/wp\/v2\/media?parent=2761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/emizentech.com\/blog\/wp-json\/wp\/v2\/categories?post=2761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/emizentech.com\/blog\/wp-json\/wp\/v2\/tags?post=2761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}