{"id":1585,"date":"2026-06-17T07:02:29","date_gmt":"2026-06-17T07:02:29","guid":{"rendered":"https:\/\/www.hostx.ro\/kb\/bin-magento-must-be-run-as-a-cli-application\/"},"modified":"2026-07-25T14:56:01","modified_gmt":"2026-07-25T12:56:01","password":"","slug":"bin-magento-must-be-run-as-a-cli-application","status":"publish","type":"docs","link":"https:\/\/www.hostx.ro\/kb\/bin-magento-must-be-run-as-a-cli-application\/","title":{"rendered":"bin\/magento must be run as a CLI application"},"content":{"rendered":"<p>Cron job-urile Magento trebuie rulate folosind PHP \u00een modul CLI. Dac\u0103 prime\u0219ti eroarea \u201ebin\/magento must be run as a CLI application&#8221;, modific\u0103 cron job-ul astfel \u00eenc\u00e2t s\u0103 foloseasc\u0103 binarul <strong>php-cli<\/strong> \u00een locul lui <code>php<\/code>.<\/p>\n<p>Din:<\/p>\n<pre>php \/home\/username\/public_html\/bin\/magento indexer:reindex &gt; \/dev\/null 2&gt;&1<\/pre>\n<p>\u00cen:<\/p>\n<pre>php-cli \/home\/username\/public_html\/bin\/magento indexer:reindex &gt; \/dev\/null 2&gt;&1<\/pre>\n<p>Intervalul de execu\u021bie poate fi m\u0103rit pentru a reduce consumul de resurse; valoarea recomandat\u0103 este de 15\u201330 de minute.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cron job-urile Magento trebuie rulate folosind PHP \u00een modul CLI. Dac\u0103 prime\u0219ti eroarea \u201ebin\/magento must be run as a CLI application&#8221;, modific\u0103 cron job-ul astfel \u00eenc\u00e2t s\u0103 foloseasc\u0103 binarul php-cli \u00een locul lui php. Din: php \/home\/username\/public_html\/bin\/magento indexer:reindex &gt; \/dev\/null 2&gt;&#038;1 \u00cen: php-cli \/home\/username\/public_html\/bin\/magento indexer:reindex &gt; \/dev\/null 2&gt;&#038;1 Intervalul de execu\u021bie poate fi m\u0103rit pentru &#8230; <a title=\"bin\/magento must be run as a CLI application\" class=\"read-more\" href=\"https:\/\/www.hostx.ro\/kb\/bin-magento-must-be-run-as-a-cli-application\/\" aria-label=\"Cite\u0219te mai multe despre bin\/magento must be run as a CLI application\">Cite\u0219te mai mult<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"whmcs_kb_id":481,"footnotes":""},"doc_category":[161],"doc_tag":[437,227,336,225,248],"class_list":["post-1585","docs","type-docs","status-publish","hentry","doc_category-cron-jobs-magento-programare-aplicatii","doc_tag-cli","doc_tag-configurare","doc_tag-cron","doc_tag-magento-2","doc_tag-troubleshooting"],"year_month":"2026-08","word_count":85,"total_views":"19","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"Adrian Firican","author_nicename":"techeditor1","author_url":"https:\/\/www.hostx.ro\/kb\/author\/techeditor1\/"},"doc_category_info":[{"term_name":"Cron jobs","term_url":"https:\/\/www.hostx.ro\/kb\/docs-category\/cron-jobs-magento-programare-aplicatii\/"}],"doc_tag_info":[{"term_name":"CLI","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/cli\/"},{"term_name":"configurare","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/configurare\/"},{"term_name":"cron","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/cron\/"},{"term_name":"Magento 2","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/magento-2\/"},{"term_name":"Troubleshooting","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/troubleshooting\/"}],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Eroare Magento bin\/magento CLI - Solu\u021bie - Centrul de suport HostX<\/title>\n<meta name=\"description\" content=\"Rezolv\u0103 eroarea Magento &#039;bin\/magento must be run as a CLI application&#039;. Folose\u0219te php-cli \u00een loc de php pentru cron jobs \u0219i optimizeaz\u0103 intervalele.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hostx.ro\/kb\/bin-magento-must-be-run-as-a-cli-application\/\" \/>\n<meta property=\"og:locale\" content=\"ro_RO\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Eroare Magento bin\/magento CLI - Solu\u021bie - Centrul de suport HostX\" \/>\n<meta property=\"og:description\" content=\"Rezolv\u0103 eroarea Magento &#039;bin\/magento must be run as a CLI application&#039;. Folose\u0219te php-cli \u00een loc de php pentru cron jobs \u0219i optimizeaz\u0103 intervalele.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hostx.ro\/kb\/bin-magento-must-be-run-as-a-cli-application\/\" \/>\n<meta property=\"og:site_name\" content=\"Centrul de suport HostX\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-25T12:56:01+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/bin-magento-must-be-run-as-a-cli-application\\\/\",\"url\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/bin-magento-must-be-run-as-a-cli-application\\\/\",\"name\":\"Eroare Magento bin\\\/magento CLI - Solu\u021bie - Centrul de suport HostX\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/#website\"},\"datePublished\":\"2026-06-17T07:02:29+00:00\",\"dateModified\":\"2026-07-25T12:56:01+00:00\",\"description\":\"Rezolv\u0103 eroarea Magento 'bin\\\/magento must be run as a CLI application'. Folose\u0219te php-cli \u00een loc de php pentru cron jobs \u0219i optimizeaz\u0103 intervalele.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/bin-magento-must-be-run-as-a-cli-application\\\/#breadcrumb\"},\"inLanguage\":\"ro-RO\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/bin-magento-must-be-run-as-a-cli-application\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/bin-magento-must-be-run-as-a-cli-application\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Prima pagin\u0103\",\"item\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"InfoCentru\",\"item\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/docs\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"bin\\\/magento must be run as a CLI application\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/\",\"name\":\"Centrul de suport HostX\",\"description\":\"tutoriale gazduire web, domenii web \u0219i servere\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ro-RO\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Eroare Magento bin\/magento CLI - Solu\u021bie - Centrul de suport HostX","description":"Rezolv\u0103 eroarea Magento 'bin\/magento must be run as a CLI application'. Folose\u0219te php-cli \u00een loc de php pentru cron jobs \u0219i optimizeaz\u0103 intervalele.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hostx.ro\/kb\/bin-magento-must-be-run-as-a-cli-application\/","og_locale":"ro_RO","og_type":"article","og_title":"Eroare Magento bin\/magento CLI - Solu\u021bie - Centrul de suport HostX","og_description":"Rezolv\u0103 eroarea Magento 'bin\/magento must be run as a CLI application'. Folose\u0219te php-cli \u00een loc de php pentru cron jobs \u0219i optimizeaz\u0103 intervalele.","og_url":"https:\/\/www.hostx.ro\/kb\/bin-magento-must-be-run-as-a-cli-application\/","og_site_name":"Centrul de suport HostX","article_modified_time":"2026-07-25T12:56:01+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.hostx.ro\/kb\/bin-magento-must-be-run-as-a-cli-application\/","url":"https:\/\/www.hostx.ro\/kb\/bin-magento-must-be-run-as-a-cli-application\/","name":"Eroare Magento bin\/magento CLI - Solu\u021bie - Centrul de suport HostX","isPartOf":{"@id":"https:\/\/www.hostx.ro\/kb\/#website"},"datePublished":"2026-06-17T07:02:29+00:00","dateModified":"2026-07-25T12:56:01+00:00","description":"Rezolv\u0103 eroarea Magento 'bin\/magento must be run as a CLI application'. Folose\u0219te php-cli \u00een loc de php pentru cron jobs \u0219i optimizeaz\u0103 intervalele.","breadcrumb":{"@id":"https:\/\/www.hostx.ro\/kb\/bin-magento-must-be-run-as-a-cli-application\/#breadcrumb"},"inLanguage":"ro-RO","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hostx.ro\/kb\/bin-magento-must-be-run-as-a-cli-application\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hostx.ro\/kb\/bin-magento-must-be-run-as-a-cli-application\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Prima pagin\u0103","item":"https:\/\/www.hostx.ro\/kb\/"},{"@type":"ListItem","position":2,"name":"InfoCentru","item":"https:\/\/www.hostx.ro\/kb\/docs\/"},{"@type":"ListItem","position":3,"name":"bin\/magento must be run as a CLI application"}]},{"@type":"WebSite","@id":"https:\/\/www.hostx.ro\/kb\/#website","url":"https:\/\/www.hostx.ro\/kb\/","name":"Centrul de suport HostX","description":"tutoriale gazduire web, domenii web \u0219i servere","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hostx.ro\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ro-RO"}]}},"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/docs\/1585","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/comments?post=1585"}],"version-history":[{"count":2,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/docs\/1585\/revisions"}],"predecessor-version":[{"id":5064,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/docs\/1585\/revisions\/5064"}],"wp:attachment":[{"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/media?parent=1585"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/doc_category?post=1585"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/doc_tag?post=1585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}