{"id":15305,"date":"2019-08-22T18:23:44","date_gmt":"2019-08-22T16:23:44","guid":{"rendered":"https:\/\/www.wp-amazon-plugin.com\/?post_type=knowledgebase&#038;p=15305"},"modified":"2020-09-13T19:28:58","modified_gmt":"2020-09-13T17:28:58","slug":"the-asa2-refresh-cronjob-is-not-working-on-cpanel","status":"publish","type":"knowledgebase","link":"https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/","title":{"rendered":"The ASA2 refresh cronjob is not working on cPanel"},"content":{"rendered":"<h3>Problem<\/h3>\n<p>If you have configured the <strong>refresh cronjob<\/strong> as <a href=\"http:\/\/docs.getasa2.com\/cronjobs_repo_refresh.html\" target=\"_blank\" rel=\"noopener noreferrer\">explained in the online documentation<\/a> but you do not get any results, this might have something to do with the server-side PHP command used to execute the script. By default, ASA2 uses the &#8222;php&#8220; command to execute server-side scripts. On some servers this might be an older PHP version and will not work as expected. One solution is to use the &#8222;php5&#8220; command.<\/p>\n<h3>Solution<\/h3>\n<p>1. Create a new shell script in your user directory, e.g.\u00a0<strong>\/home\/[your-username]\/cronjobs\/asa2_repo_refresh.sh<\/strong><\/p>\n<p>2. Insert the following lines in this file, where\u00a0<strong>[path-to-your-website]<\/strong> must be replaced with the path to your WordPress installation starting with &#8222;\/home&#8220;, like &#8222;\/home\/timo\/asa2demo&#8220;:<\/p>\n<p><strong>Option 1<\/strong><\/p>\n<pre class=\"lang:sh decode:true\">#!\/bin\/sh\r\nphp -f [path-to-your-website]\/wp-content\/plugins\/amazon-simple-affiliate\/lib\/IfwAsa2\/Wp\/Plugin\/Cli\/Executables\/script.php -- \"[path-to-your-website]\/wp-content\/plugins\/amazon-simple-affiliate\" Asa2_Module_Repo_Cron_Refresh -lt=600 -limit=10 --verbose<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Option 2<\/strong><\/p>\n<p>Another option is to add the path to the PHP 5 or 7 version to the environment variable &#8222;PATH&#8220; and then execute the shell script, like this:<\/p>\n<pre class=\"lang:sh decode:true\">#!\/bin\/sh\r\nexport PATH=\/opt\/plesk\/php\/7.1\/bin:$PATH &amp;&amp; \/bin\/sh[path-to-your-website]\/wp-content\/plugins\/amazon-simple-affiliate\/scripts\/script.sh Asa2_Module_Repo_Cron_Refresh --lifetime=3600 --verbose --limit=10 &gt;\/dev\/null 2&gt;&amp;1<\/pre>\n<p>where &#8222;\/opt\/plesk\/php\/7.1\/bin&#8220; must be adjusted to your server&#8217;s path to the newest PHP version.<\/p>\n<p>3. Then configure this script in your cPanel cronjob panel as shown on the following screenshot:<\/p>\n<div style=\"width: 1254px\" class=\"wp-caption alignnone\"><img decoding=\"async\" class=\"size-medium\" src=\"https:\/\/ifeelwebde.zendesk.com\/hc\/en-us\/article_attachments\/115001118563\/cPanel_cronjob_config.png\" width=\"1244\" height=\"219\" \/><p class=\"wp-caption-text\">cPanel cronjob configuration<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>Please also check ASA2&#8217;s cronjob calculator:<\/p>\n<a  class=\"x-btn x-btn-rounded x-btn-regular\"  href=\"\/asa-2\/asa2-cronjob-calculator\/\"     data-options=\"thumbnail: ''\">ASA2 cronjob calculator<\/a>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Short URL: <a href=\"http:\/\/bit.ly\/asa2-custom-cron\">http:\/\/bit.ly\/asa2-custom-cron<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem If you have configured the refresh cronjob as explained in the online documentation but you do not get any results, this might have something to do with the server-side PHP command used to execute the script. By default, ASA2 uses the &#8222;php&#8220; command to execute server-side scripts. On some servers this might be an older PHP version and will &#8230; <\/p>\n<div><a href=\"https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/\" class=\"more-link\">Read More<\/a><\/div>\n","protected":false},"author":1170,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","knowledgebase_cat":[209],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>The ASA2 refresh cronjob is not working on cPanel - Amazon Simple Affiliate<\/title>\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.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The ASA2 refresh cronjob is not working on cPanel - Amazon Simple Affiliate\" \/>\n<meta property=\"og:description\" content=\"Problem If you have configured the refresh cronjob as explained in the online documentation but you do not get any results, this might have something to do with the server-side PHP command used to execute the script. By default, ASA2 uses the &#8222;php&#8220; command to execute server-side scripts. On some servers this might be an older PHP version and will ... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/\" \/>\n<meta property=\"og:site_name\" content=\"Amazon Simple Affiliate\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpasa2\/\" \/>\n<meta property=\"article:modified_time\" content=\"2020-09-13T17:28:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ifeelwebde.zendesk.com\/hc\/en-us\/article_attachments\/115001118563\/cPanel_cronjob_config.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ifeelwebde\" \/>\n<meta name=\"twitter:label1\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data1\" content=\"1\u00a0Minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/\",\"url\":\"https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/\",\"name\":\"The ASA2 refresh cronjob is not working on cPanel - Amazon Simple Affiliate\",\"isPartOf\":{\"@id\":\"https:\/\/www.wp-amazon-plugin.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ifeelwebde.zendesk.com\/hc\/en-us\/article_attachments\/115001118563\/cPanel_cronjob_config.png\",\"datePublished\":\"2019-08-22T16:23:44+00:00\",\"dateModified\":\"2020-09-13T17:28:58+00:00\",\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/#primaryimage\",\"url\":\"https:\/\/ifeelwebde.zendesk.com\/hc\/en-us\/article_attachments\/115001118563\/cPanel_cronjob_config.png\",\"contentUrl\":\"https:\/\/ifeelwebde.zendesk.com\/hc\/en-us\/article_attachments\/115001118563\/cPanel_cronjob_config.png\"},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wp-amazon-plugin.com\/#website\",\"url\":\"https:\/\/www.wp-amazon-plugin.com\/\",\"name\":\"Amazon Simple Affiliate\",\"description\":\"Upgrade your WordPress Affiliate skills!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wp-amazon-plugin.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The ASA2 refresh cronjob is not working on cPanel - Amazon Simple Affiliate","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.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/","og_locale":"de_DE","og_type":"article","og_title":"The ASA2 refresh cronjob is not working on cPanel - Amazon Simple Affiliate","og_description":"Problem If you have configured the refresh cronjob as explained in the online documentation but you do not get any results, this might have something to do with the server-side PHP command used to execute the script. By default, ASA2 uses the &#8222;php&#8220; command to execute server-side scripts. On some servers this might be an older PHP version and will ... Read More","og_url":"https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/","og_site_name":"Amazon Simple Affiliate","article_publisher":"https:\/\/www.facebook.com\/wpasa2\/","article_modified_time":"2020-09-13T17:28:58+00:00","og_image":[{"url":"https:\/\/ifeelwebde.zendesk.com\/hc\/en-us\/article_attachments\/115001118563\/cPanel_cronjob_config.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_site":"@ifeelwebde","twitter_misc":{"Gesch\u00e4tzte Lesezeit":"1\u00a0Minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/","url":"https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/","name":"The ASA2 refresh cronjob is not working on cPanel - Amazon Simple Affiliate","isPartOf":{"@id":"https:\/\/www.wp-amazon-plugin.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/#primaryimage"},"image":{"@id":"https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/ifeelwebde.zendesk.com\/hc\/en-us\/article_attachments\/115001118563\/cPanel_cronjob_config.png","datePublished":"2019-08-22T16:23:44+00:00","dateModified":"2020-09-13T17:28:58+00:00","inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/"]}]},{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.wp-amazon-plugin.com\/de\/knowledge-base\/asa2\/cronjob\/the-asa2-refresh-cronjob-is-not-working-on-cpanel\/#primaryimage","url":"https:\/\/ifeelwebde.zendesk.com\/hc\/en-us\/article_attachments\/115001118563\/cPanel_cronjob_config.png","contentUrl":"https:\/\/ifeelwebde.zendesk.com\/hc\/en-us\/article_attachments\/115001118563\/cPanel_cronjob_config.png"},{"@type":"WebSite","@id":"https:\/\/www.wp-amazon-plugin.com\/#website","url":"https:\/\/www.wp-amazon-plugin.com\/","name":"Amazon Simple Affiliate","description":"Upgrade your WordPress Affiliate skills!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wp-amazon-plugin.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"}]}},"_links":{"self":[{"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/knowledgebase\/15305"}],"collection":[{"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/knowledgebase"}],"about":[{"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/types\/knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/users\/1170"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/comments?post=15305"}],"version-history":[{"count":6,"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/knowledgebase\/15305\/revisions"}],"predecessor-version":[{"id":16321,"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/knowledgebase\/15305\/revisions\/16321"}],"wp:attachment":[{"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/media?parent=15305"}],"wp:term":[{"taxonomy":"knowledgebase_cat","embeddable":true,"href":"https:\/\/www.wp-amazon-plugin.com\/de\/wp-json\/wp\/v2\/knowledgebase_cat?post=15305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}