{"id":519,"date":"2020-02-28T16:10:35","date_gmt":"2020-02-28T16:10:35","guid":{"rendered":"http:\/\/wiki2.plumserver.com\/knowledge-base\/private-sales-v-2-0-setting-up-magento-cron-job"},"modified":"2021-07-08T15:04:41","modified_gmt":"2021-07-08T12:04:41","slug":"private-sales-v-2-0-setting-up-magento-cron-job","status":"publish","type":"post","link":"https:\/\/plumrocket.com\/docs\/magento-1-private-sales-package\/v2\/configuration\/cron-job","title":{"rendered":"Private Sales v.2.0: Setting Up Magento Cron Job"},"content":{"rendered":"\n<h2 id=\"magento-cron\">Magento Cron<\/h2>\n\n\n\n<p>Cron allows you to schedule actions ahead. It is convenient to use Cron when it it necessary to perform daily repeated tasks in the Magento System. For instance, MailChimp (newsletter) subscribers updates, back-ups, or clearing logs at the end of each month.<\/p>\n\n\n\n<p>Cron will automatically do all the scheduled actions, i.e. you will not have to do it manually. For example, without a Magento cron job set-up, you will have to manually refresh the catalog price rules and catalog indices several times a day. If you have a large store this can take a long time to perform, whereas forgetting to do it could lose you money.<\/p>\n\n\n\n<p>Below you will learn how to set up the Cron service, that will automatically launch different tasks according to the schedule.<\/p>\n\n\n\n<p>First, consider the path to the root category of your store. For instance, \/var\/www\/your_website_domain_name\/web\/. You have to set the cyclic execution of the file cron.sh in the root category. For instance \/var\/www\/your_website_domain_name\/web\/cron.sh. If you have access to ssh, and there is no corresponding functionality in your Hosting Admin panel, follow the tips below.<\/p>\n\n\n\n<p>Open the Cron tab, where Cron commands are set.<\/p>\n\n\n\n<p>In order to open the Cron tab under your ssh account, enter following command:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-\">crontab -e<\/code><\/pre><\/div>\n\n\n\n<p>If you want to open the Cron tab under someone else&#8217;s account, enter this command:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">crontab -u USERNAME -e<\/code><\/pre><\/div>\n\n\n\n<p>Where the &#8220;USERNAME&#8221; is a login of a person you want to launch the cron job.<\/p>\n\n\n\n<p>Enter your command at the end of the file:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">*\/5 * * * * sh \/var\/www\/your_websitesite_domain_name\/web\/cron.sh<\/code><\/pre><\/div>\n\n\n\n<p>close and save.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magento Cron Cron allows you to schedule actions ahead. It is convenient to use Cron when it it necessary to perform daily repeated tasks in the Magento System. For instance, MailChimp (newsletter) subscribers updates, back-ups, or clearing logs at the end of each month. Cron will automatically do all the scheduled actions, i.e. you will &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/plumrocket.com\/docs\/magento-1-private-sales-package\/v2\/configuration\/cron-job\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Private Sales v.2.0: Setting Up Magento Cron Job&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[304],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v17.2 (Yoast SEO v17.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Private Sales v.2.0: Setting Up Magento Cron Job - Plumrocket Documentation<\/title>\n<meta name=\"description\" content=\"Magento Cron Cron allows you to schedule actions ahead. It is convenient to use Cron when it it necessary to perform daily repeated tasks in the Magento\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/plumrocket.com\/docs\/magento-1-private-sales-package\/v2\/configuration\/cron-job\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Private Sales v.2.0: Setting Up Magento Cron Job\" \/>\n<meta property=\"og:description\" content=\"Magento Cron Cron allows you to schedule actions ahead. It is convenient to use Cron when it it necessary to perform daily repeated tasks in the Magento\" \/>\n<meta property=\"og:url\" content=\"https:\/\/plumrocket.com\/docs\/magento-1-private-sales-package\/v2\/configuration\/cron-job\" \/>\n<meta property=\"og:site_name\" content=\"Plumrocket Documentation\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-28T16:10:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-08T12:04:41+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Plumrocket\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Private Sales v.2.0: Setting Up Magento Cron Job - Plumrocket Documentation","description":"Magento Cron Cron allows you to schedule actions ahead. It is convenient to use Cron when it it necessary to perform daily repeated tasks in the Magento","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:\/\/plumrocket.com\/docs\/magento-1-private-sales-package\/v2\/configuration\/cron-job","og_locale":"en_US","og_type":"article","og_title":"Private Sales v.2.0: Setting Up Magento Cron Job","og_description":"Magento Cron Cron allows you to schedule actions ahead. It is convenient to use Cron when it it necessary to perform daily repeated tasks in the Magento","og_url":"https:\/\/plumrocket.com\/docs\/magento-1-private-sales-package\/v2\/configuration\/cron-job","og_site_name":"Plumrocket Documentation","article_published_time":"2020-02-28T16:10:35+00:00","article_modified_time":"2021-07-08T12:04:41+00:00","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Plumrocket","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/plumrocket.com\/docs\/#website","url":"https:\/\/plumrocket.com\/docs\/","name":"Plumrocket Documentation","description":"Extensions docs, troubleshootings etc.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/plumrocket.com\/docs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/plumrocket.com\/docs\/magento-1-private-sales-package\/v2\/configuration\/cron-job#webpage","url":"https:\/\/plumrocket.com\/docs\/magento-1-private-sales-package\/v2\/configuration\/cron-job","name":"Private Sales v.2.0: Setting Up Magento Cron Job - Plumrocket Documentation","isPartOf":{"@id":"https:\/\/plumrocket.com\/docs\/#website"},"datePublished":"2020-02-28T16:10:35+00:00","dateModified":"2021-07-08T12:04:41+00:00","author":{"@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/38b360639b934d6c984ee4f3ffce7d20"},"description":"Magento Cron Cron allows you to schedule actions ahead. It is convenient to use Cron when it it necessary to perform daily repeated tasks in the Magento","breadcrumb":{"@id":"https:\/\/plumrocket.com\/docs\/magento-1-private-sales-package\/v2\/configuration\/cron-job#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/plumrocket.com\/docs\/magento-1-private-sales-package\/v2\/configuration\/cron-job"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/plumrocket.com\/docs\/magento-1-private-sales-package\/v2\/configuration\/cron-job#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Docs","item":"https:\/\/plumrocket.com\/docs"},{"@type":"ListItem","position":2,"name":"Magento 1 Packages","item":"https:\/\/plumrocket.com\/docs\/magento-1-packages"},{"@type":"ListItem","position":3,"name":"Private Sales Script","item":"https:\/\/plumrocket.com\/docs\/magento-1-private-sales-package"},{"@type":"ListItem","position":4,"name":"v2","item":"https:\/\/plumrocket.com\/docs\/magento-1-private-sales-package\/v2"},{"@type":"ListItem","position":5,"name":"Setting Up Magento Cron Job"}]},{"@type":"Person","@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/38b360639b934d6c984ee4f3ffce7d20","name":"Plumrocket","image":{"@type":"ImageObject","@id":"https:\/\/plumrocket.com\/docs\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/72392a92ae750c66560be284502b6676?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/72392a92ae750c66560be284502b6676?s=96&d=mm&r=g","caption":"Plumrocket"},"sameAs":["https:\/\/plumrocket.com\/docs"]}]}},"_links":{"self":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/519"}],"collection":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/comments?post=519"}],"version-history":[{"count":0,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/519\/revisions"}],"wp:attachment":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/media?parent=519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/categories?post=519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/tags?post=519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}