{"id":588,"date":"2013-02-26T13:33:05","date_gmt":"2013-02-26T13:33:05","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2013\/02\/26\/cron-job-php-version\/"},"modified":"2024-03-11T16:35:04","modified_gmt":"2024-03-11T20:35:04","slug":"force-cron-jobs-php-version","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/","title":{"rendered":"How to Set Up or Force Cron Jobs to Use a PHP Version"},"content":{"rendered":"<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/forcing-php-version-1024x538.jpg\" alt=\"How to Force Cron Jobs to use a PHP version\" class=\"wp-image-82511\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/forcing-php-version-1024x538.jpg 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/forcing-php-version-300x158.jpg 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/forcing-php-version-768x403.jpg 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/forcing-php-version.jpg 1200w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p>In all but our oldest servers, we have implemented a feature that allows you to<a href=\"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-change-the-php-version-your-account-uses\/\"> set a version of PHP you want to use on your account<\/a>. However, cron jobs running on a server will normally use the PHP version set for the server, and not the one specified by the PHP version tool.  If your cron job needs to run with a different version of PHP, then you will need to specify it in your cron job command or script.<br><br>The need to <strong>force cron jobs to use a PHP version<\/strong> is especially important for some application-specific cron jobs from software like WHMCS.\u00a0<br><br>The cron PHP version mismatch error is a common error in some applications that will require you to specifically identify the PHP version \u2018switch\u2019 for your cron jobs. You will see an example of the PHP Version mismatch error and how to edit the cron job command to use the specific switch leading to the needed PHP version.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#common\">Common Cron Job Error \u2013 Cron PHP Version Mismatch<\/a><\/li>\n\n\n\n<li><a href=\"#specific\">Force Cron Jobs to Use a PHP Version<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"alert alert-info\">Looking for a new WordPress hosting solution?  Check out InMotion\u2019s <a href=\"https:\/\/inmotionhosting.com\/wordpress-hosting\">WordPress Hosting<\/a> servers for secure, performance-oriented solutions for your hosting needs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"common\">Common Cron Job Error \u2013 Cron PHP Version Mismatch<\/h2>\n\n\n\n<p>Typically, this error occurs when there are multiple software being used on a hosting server.  The PHP version switcher allows you to specify a newer version of PHP to be used with the website.  However, the cron jobs for the software may be using the PHP version configured specifically to the server.  This leads to the PHP version mismatch error. You can fix the error by simply forcing the cron job to use a specific PHP version.\u00a0\u00a0<\/p>\n\n\n\n<p>This is a commonly reported error with the <a href=\"https:\/\/www.whmcs.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">WHMCS application<\/a>.\u00a0 You may first see a warning about the PHP version that looks something like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"910\" height=\"187\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/whmcs-warning-1.jpg\" alt=\"PHP version warning - WHMCS\" class=\"wp-image-82521\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/whmcs-warning-1.jpg 910w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/whmcs-warning-1-300x62.jpg 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/whmcs-warning-1-768x158.jpg 768w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p>This can often lead a person to upgrade their PHP version on their website, but the upgrade can lead to this error:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"856\" height=\"154\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2013\/02\/cron-mismatch-error.jpg\" alt=\"Cron mismatch error\" class=\"wp-image-100081\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2013\/02\/cron-mismatch-error.jpg 856w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2013\/02\/cron-mismatch-error-300x54.jpg 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2013\/02\/cron-mismatch-error-768x138.jpg 768w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p>In this case, the website is using the newer version of PHP, but the cron jobs are using an older PHP version configured for the server by default.  If you see this error, then you will need to set your cron job to use a specific version of PHP. The steps to force cron jobs to use a specific PHP version are described in the next section.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"specific\">Force Cron Jobs to use a PHP Version<\/h2>\n\n\n\n<p>Follow the steps below in order to force your cron job to use a specific PHP version.<\/p>\n\n\n\n<ol class=\"article_list wp-block-list\">\n<li>First, <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/how-to-log-into-cpanel\/\">log into your cPanel dashboard<\/a>.<\/li>\n\n\n\n<li>Find the <em>Advanced<\/em> category and click on the Cron Jobs icon.<br><br><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"130\" class=\"wp-image-82522\" style=\"width: 600px;\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/cpanel-advanced-cronjobs-icon.jpg\" alt=\"cPanel Cron Jobs icon\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/cpanel-advanced-cronjobs-icon.jpg 935w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/cpanel-advanced-cronjobs-icon-300x65.jpg 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/cpanel-advanced-cronjobs-icon-768x167.jpg 768w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><br><\/li>\n\n\n\n<li>This takes you to the cron job set up page. At the bottom of the screen you will see the cron jobs you have currently scheduled. Click on the <strong>Edit <\/strong>link on the right to edit the cron command.<br><br><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"103\" class=\"wp-image-5983\" style=\"width: 600px;\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2013\/02\/cpanel_cron_cronlist.png\" alt=\"cpanel cron job list\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2013\/02\/cpanel_cron_cronlist.png 969w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2013\/02\/cpanel_cron_cronlist-300x51.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2013\/02\/cpanel_cron_cronlist-768x132.png 768w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><br><\/li>\n\n\n\n<li>You will now see the command line field so you can edit it. The cron command is in two parts, the first part calls the PHP and the second part is the path for the script you want to run. <br><br><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"724\" class=\"wp-image-88515\" style=\"width: 750px;\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2013\/02\/edit-command.jpg\" alt=\"edit command option in cron job page\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2013\/02\/edit-command.jpg 599w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2013\/02\/edit-command-300x289.jpg 300w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><br><br><br><\/li>\n<\/ol>\n\n\n\n<p>The command code for the sample cronjob is displayed below:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php -q \/home\/userna5\/public_html\/cronscript.php<\/code><\/pre>\n\n\n\n<p>We want to replace the first part of the code <strong>(php -q)<\/strong> with<strong> (\/opt\/php74\/bin\/php -q)<\/strong> for PHP 7.4 and above:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/opt\/php74\/bin\/php -q \/home\/userna5\/public_html\/cronscript.php<\/code><\/pre>\n\n\n\n<p>or (<strong>\/opt\/php72\/bin\/php -q)<\/strong> for PHP 7.2 as shown:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/opt\/php72\/bin\/php -q \/home\/userna5\/public_html\/cronscript.php\n<\/code><\/pre>\n\n\n\n<p>Enter the new code at the beginning of the command, then click the <strong>Edit Line<\/strong> button to save it. The cron job will now use the correct PHP version. You will need to do this for each cron job so that they are certain to use the correct PHP version.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity is-style-wide\">\n\n\n\n<p>You should now be able to recognize the common PHP version mismatch error and force cron jobs to use a PHP version that can fix the error. <\/p>\n\n\n<div class=\"jumbotron\">\r\n<p>Say goodbye to slow loading times and hello to high-performance websites with our <a href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\/wordpress?mktgp=t&irgwc=1&affiliates=5001860&utm_campaign=Jumbotron&utm_source=supportcenter&utm_medium=cta&utm_term=wp-cta2\">WordPress VPS Hosting<\/a> plans. Experience 40x faster WordPress page load speeds on purpose-built servers that guarantee 99.99% uptime.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>High-Performance VPS    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Premier Care    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Free SSL &amp; Dedicated IP    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/icons\/standard\/check-blue.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Advanced Server Caching<\/p>\r\n<p><a class=\"btn btn-primary btn-lg\" href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\/wordpress?mktgp=t&irgwc=1&affiliates=5001860&utm_campaign=Jumbotron&utm_source=supportcenter&utm_medium=cta&utm_term=wp-cta2\">Managed WordPress VPS<\/a><\/p>\r\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In all but our oldest servers, we have implemented a feature that allows you to set a version of PHP you want to use on your account. However, cron jobs running on a server will normally use the PHP version set for the server, and not the one specified by the PHP version tool. If<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/\"> Read More ><\/a><\/p>\n","protected":false},"author":57014,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[51,4288],"tags":[],"class_list":["post-588","post","type-post","status-publish","format-standard","hentry","category-cpanel","category-website"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Set Up or Force Cron Jobs to Use a PHP Version | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"Need to get your cron job to run the correct version of php? Learn how in this quick how-to tutorial.\" \/>\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.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Set Up or Force Cron Jobs use a PHP Version\" \/>\n<meta property=\"og:description\" content=\"Learn about how to force cron jobs to use a PHP version and the common application error that requires it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2013-02-26T13:33:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-11T20:35:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/forcing-php-version.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"InMotion Hosting Contributor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InMotion Hosting Contributor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\"},\"headline\":\"How to Set Up or Force Cron Jobs to Use a PHP Version\",\"datePublished\":\"2013-02-26T13:33:05+00:00\",\"dateModified\":\"2024-03-11T20:35:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/\"},\"wordCount\":661,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/forcing-php-version-1024x538.jpg\",\"articleSection\":[\"cPanel\",\"Website\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/\",\"name\":\"How to Set Up or Force Cron Jobs to Use a PHP Version | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/forcing-php-version-1024x538.jpg\",\"datePublished\":\"2013-02-26T13:33:05+00:00\",\"dateModified\":\"2024-03-11T20:35:04+00:00\",\"description\":\"Need to get your cron job to run the correct version of php? Learn how in this quick how-to tutorial.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/#primaryimage\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/forcing-php-version.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/forcing-php-version.jpg\",\"width\":1200,\"height\":630,\"caption\":\"How to Set Up or Force Cron Jobs to Use a PHP Version\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Set Up or Force Cron Jobs to Use a PHP Version\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\",\"name\":\"InMotion Hosting Contributor\",\"description\":\"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!\",\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/inmotion-hosting\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Set Up or Force Cron Jobs to Use a PHP Version | InMotion Hosting","description":"Need to get your cron job to run the correct version of php? Learn how in this quick how-to tutorial.","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.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/","og_locale":"en_US","og_type":"article","og_title":"How to Set Up or Force Cron Jobs use a PHP Version","og_description":"Learn about how to force cron jobs to use a PHP version and the common application error that requires it.","og_url":"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2013-02-26T13:33:05+00:00","article_modified_time":"2024-03-11T20:35:04+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/forcing-php-version.jpg","type":"image\/jpeg"}],"author":"InMotion Hosting Contributor","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"InMotion Hosting Contributor","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644"},"headline":"How to Set Up or Force Cron Jobs to Use a PHP Version","datePublished":"2013-02-26T13:33:05+00:00","dateModified":"2024-03-11T20:35:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/"},"wordCount":661,"commentCount":5,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/forcing-php-version-1024x538.jpg","articleSection":["cPanel","Website"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/","url":"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/","name":"How to Set Up or Force Cron Jobs to Use a PHP Version | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/#primaryimage"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/forcing-php-version-1024x538.jpg","datePublished":"2013-02-26T13:33:05+00:00","dateModified":"2024-03-11T20:35:04+00:00","description":"Need to get your cron job to run the correct version of php? Learn how in this quick how-to tutorial.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/#primaryimage","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/forcing-php-version.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2021\/08\/forcing-php-version.jpg","width":1200,"height":630,"caption":"How to Set Up or Force Cron Jobs to Use a PHP Version"},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/force-cron-jobs-php-version\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Set Up or Force Cron Jobs to Use a PHP Version"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644","name":"InMotion Hosting Contributor","description":"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!","sameAs":["https:\/\/www.linkedin.com\/company\/inmotion-hosting\/","https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":{"id":4288,"name":"Website","slug":"website","link":"https:\/\/www.inmotionhosting.com\/support\/website\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/588","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/57014"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=588"}],"version-history":[{"count":17,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/588\/revisions"}],"predecessor-version":[{"id":108998,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/588\/revisions\/108998"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}