{"id":687,"date":"2023-02-17T18:05:00","date_gmt":"2023-02-17T18:05:00","guid":{"rendered":"https:\/\/yohost.org\/library\/?p=687"},"modified":"2023-02-14T09:18:26","modified_gmt":"2023-02-14T09:18:26","slug":"how-to-create-a-cronjob-to-run-a-php-script-cpanel","status":"publish","type":"post","link":"https:\/\/yohost.org\/library\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\/","title":{"rendered":"How to create a cronjob to run a PHP script (cPanel)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In this article we will learn how to create a cronjob to run a PHP script in cPanel. We have recently updated cPanel to the Jupiter theme, the latest one, so do not be worried if our interface looks different from your cPanel theme.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-login-to-cpanel\">Login to cPanel<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Just in case you do not know where cPanel is located, you can get there in two ways.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>cPanel is generally located on port 2083, so you can access the login with the IP and port, for example: https:\/\/<mark style=\"background-color:#49ff52\" class=\"has-inline-color\">192.168.0.1<\/mark>:<mark style=\"background-color:#faf341\" class=\"has-inline-color\">2083<\/mark>. <\/li>\n\n\n\n<li>Another option is to access cPanel from the WHM server administration panel, like it&#8217;s show in the image below.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><span class=\"placeholder-el\" data-svq-align=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-27-45x7.png\" alt=\"login to cpanel from WHM\" class=\"wp-image-722 lazy\" width=\"628\" height=\"95\" data-srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-27.png 772w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-27-300x45.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-27-768x116.png 768w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-27-45x7.png 45w\" data-sizes=\"auto, (max-width: 628px) 100vw, 628px\" data-width=\"628\" data-height=\"95\" data-src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-27.png\" style=\"height: 0; width: 628px; padding-bottom: 15.13%;\"><span class=\"svq-img-loader\"><\/span><\/span><noscript><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-27.png\" alt=\"login to cpanel from WHM\" class=\"wp-image-722\" width=\"628\" height=\"95\" srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-27.png 772w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-27-300x45.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-27-768x116.png 768w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-27-45x7.png 45w\" sizes=\"auto, (max-width: 628px) 100vw, 628px\" \/><\/noscript><figcaption class=\"wp-element-caption\">Access cPanel from WHM<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Creating a cron to run PHP<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once you are in cPanel, navigate to the <em>Advanced<\/em> section and find <em>Cron Jobs<\/em> icon.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><span class=\"placeholder-el\" data-svq-align=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-28-45x12.png\" alt=\"location of cron jobs in cPanel\" class=\"wp-image-723 lazy\" width=\"636\" height=\"171\" data-srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-28.png 985w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-28-300x81.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-28-768x207.png 768w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-28-45x12.png 45w\" data-sizes=\"auto, (max-width: 636px) 100vw, 636px\" data-width=\"636\" data-height=\"171\" data-src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-28.png\" style=\"height: 0; width: 636px; padding-bottom: 26.89%;\"><span class=\"svq-img-loader\"><\/span><\/span><noscript><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-28.png\" alt=\"location of cron jobs in cPanel\" class=\"wp-image-723\" width=\"636\" height=\"171\" srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-28.png 985w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-28-300x81.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-28-768x207.png 768w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-28-45x12.png 45w\" sizes=\"auto, (max-width: 636px) 100vw, 636px\" \/><\/noscript><figcaption class=\"wp-element-caption\">cPanel Advanced &gt; Cron Jobs<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Cron job is a handy tool which allows to automate certain tasks on the server. For example, your site may need to run certain script once a day to create a backup or send notifications to customers etc. With the cron job you can run a certain script in defined times with a set frequency.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><span class=\"placeholder-el\" data-svq-align=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-29-45x17.png\" alt=\"set email for cron job results\" class=\"wp-image-725 lazy\" width=\"568\" height=\"217\" data-srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-29-300x115.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-29-768x295.png 768w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-29-45x17.png 45w\" data-sizes=\"auto, (max-width: 568px) 100vw, 568px\" data-width=\"568\" data-height=\"217\" data-src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-29.png\" style=\"height: 0; width: 568px; padding-bottom: 38.20%;\"><span class=\"svq-img-loader\"><\/span><\/span><noscript><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-29.png\" alt=\"set email for cron job results\" class=\"wp-image-725\" width=\"568\" height=\"217\" srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-29-300x115.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-29-768x295.png 768w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-29-45x17.png 45w\" sizes=\"auto, (max-width: 568px) 100vw, 568px\" \/><\/noscript><figcaption class=\"wp-element-caption\">Cron email notifications in cPanel<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you want an email to be sent every time cron job is run, you can set one in the <em>Cron Email<\/em> like on the image above. But generally it&#8217;s not very useful, because most times you will know by itself if the script runs ok or something needs to be fixed.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><span class=\"placeholder-el\" data-svq-align=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-32-45x41.png\" alt=\"add cron job cpanel\" class=\"wp-image-728 lazy\" width=\"414\" height=\"377\" data-srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-32.png 562w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-32-300x273.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-32-45x41.png 45w\" data-sizes=\"auto, (max-width: 414px) 100vw, 414px\" data-width=\"414\" data-height=\"377\" data-src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-32.png\" style=\"height: 0; width: 414px; padding-bottom: 91.06%;\"><span class=\"svq-img-loader\"><\/span><\/span><noscript><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-32.png\" alt=\"add cron job cpanel\" class=\"wp-image-728\" width=\"414\" height=\"377\" srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-32.png 562w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-32-300x273.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-32-45x41.png 45w\" sizes=\"auto, (max-width: 414px) 100vw, 414px\" \/><\/noscript><figcaption class=\"wp-element-caption\">Cron Job settings in cPanel<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">cPanel now has a nice intuitive interface for cron jobs creation. You can set your own intervals for the cron job or you can select one of the most commonly used within <em>Common Settings<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><span class=\"placeholder-el\" data-svq-align=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-33-45x36.png\" alt class=\"wp-image-729 lazy\" width=\"430\" height=\"346\" data-srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-33.png 553w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-33-300x241.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-33-45x36.png 45w\" data-sizes=\"auto, (max-width: 430px) 100vw, 430px\" data-width=\"430\" data-height=\"346\" data-src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-33.png\" style=\"height: 0; width: 430px; padding-bottom: 80.47%;\"><span class=\"svq-img-loader\"><\/span><\/span><noscript><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-33.png\" alt=\"\" class=\"wp-image-729\" width=\"430\" height=\"346\" srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-33.png 553w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-33-300x241.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-33-45x36.png 45w\" sizes=\"auto, (max-width: 430px) 100vw, 430px\" \/><\/noscript><figcaption class=\"wp-element-caption\">Twice per day cron job<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here we have chosen the <em>Twice Per Day<\/em> in the common settings and all other fields were filled automatically. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now we only need to specify the command and add the cron job. For this task we will need two things:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Location of the script: we will need full path on the server. On cPanel it generally looks like, <em>\/home\/username\/public_html\/location\/of\/the\/file.php<\/em><\/li>\n\n\n\n<li>Command to run a PHP script. For cPanel, it will be: \/usr\/local\/bin\/ea-php74. You need to replace <em>ea-php75<\/em> with <a href=\"https:\/\/yohost.org\/library\/increase-php-memory-limit-whm-cpanel-error-500\/\" target=\"_blank\" rel=\"noreferrer noopener\">your PHP version on the server<\/a>, it can be ea-php76 or ea-php80 or some other.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><span class=\"placeholder-el\" data-svq-align=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-34-45x38.png\" alt=\"creating a cron job to run php script once per week\" class=\"wp-image-730 lazy\" width=\"420\" height=\"350\" data-srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-34.png 542w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-34-300x250.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-34-45x38.png 45w\" data-sizes=\"auto, (max-width: 420px) 100vw, 420px\" data-width=\"420\" data-height=\"350\" data-src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-34.png\" style=\"height: 0; width: 420px; padding-bottom: 83.33%;\"><span class=\"svq-img-loader\"><\/span><\/span><noscript><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-34.png\" alt=\"creating a cron job to run php script once per week\" class=\"wp-image-730\" width=\"420\" height=\"350\" srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-34.png 542w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-34-300x250.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-34-45x38.png 45w\" sizes=\"auto, (max-width: 420px) 100vw, 420px\" \/><\/noscript><figcaption class=\"wp-element-caption\">Creating a cron job<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">We only need to press &#8220;<em>Add New Cron Job<\/em>&#8221; and it will appear in the list of &#8220;<em>Current Cron Jobs<\/em>&#8220;.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><span class=\"placeholder-el\" data-svq-align=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-35-45x7.png\" alt class=\"wp-image-731 lazy\" width=\"575\" height=\"94\" data-srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-35-1024x168.png 1024w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-35-300x49.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-35-768x126.png 768w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-35-45x7.png 45w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-35.png 1080w\" data-sizes=\"auto, (max-width: 575px) 100vw, 575px\" data-width=\"575\" data-height=\"94\" data-src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-35-1024x168.png\" style=\"height: 0; width: 575px; padding-bottom: 16.35%;\"><span class=\"svq-img-loader\"><\/span><\/span><noscript><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-35-1024x168.png\" alt=\"\" class=\"wp-image-731\" width=\"575\" height=\"94\" srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-35-1024x168.png 1024w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-35-300x49.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-35-768x126.png 768w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-35-45x7.png 45w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-35.png 1080w\" sizes=\"auto, (max-width: 575px) 100vw, 575px\" \/><\/noscript><figcaption class=\"wp-element-caption\">Current Cron Jobs (cPanel)<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This is it on how to create a cron job and schedule to run a PHP script with its help. You can edit or remove newly created crons any time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article we will learn how to create a cronjob to run a PHP script in cPanel. We have recently updated cPanel to the Jupiter theme, the latest one, so do not be worried if our interface looks different from your cPanel theme. Login to cPanel Just in case you do not know where [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":730,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"stax_block_gap":"","stax_show_title_section":"","stax_single_post_media_panel_height":"","stax_single_post_media_panel_text":"","stax_single_post_cateory_breadcrumb":"","stax_single_post_title_position":"","stax_single_post_title_align":"","stax_single_post_title_extra_align":"","stax_single_post_title_size":"","stax_single_post_image_width":"","stax_single_post_image_format":"","stax_single_post_audio_panel":"","stax_single_post_video_panel":"","stax_single_post_video_width":"","stax_single_post_gallery_panel":"","stax_single_post_gallery_width":"","stax_single_post_gallery_slides":"","stax_single_post_meta_author_avatar":"","stax_single_post_meta_author_name":"","stax_single_post_meta_post_date":"","stax_single_post_meta_reading_time":"","stax_single_post_shapes":"","footnotes":""},"categories":[66],"tags":[138],"class_list":["post-687","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-create-cronjob-for-php-script-in-cpanel"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.12 (Yoast SEO v27.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to create a cronjob to run a PHP script (cPanel)<\/title>\n<meta name=\"description\" content=\"In this article we learn how to create a cronjob to run a PHP script. cPanel has an intuitive interface however there can be tricky parts.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/yohost.org\/library\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to create a cronjob to run a PHP script (cPanel)\" \/>\n<meta property=\"og:description\" content=\"In this article we learn how to create a cronjob to run a PHP script. cPanel has an intuitive interface however there can be tricky parts.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/yohost.org\/library\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\/\" \/>\n<meta property=\"og:site_name\" content=\"Privacy Dedicated Library\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-17T18:05:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-34.png?fit=542%2C452&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"542\" \/>\n\t<meta property=\"og:image:height\" content=\"452\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Paul M\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@yohostorg\" \/>\n<meta name=\"twitter:site\" content=\"@yohostorg\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Paul M\" \/>\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:\\\/\\\/yohost.org\\\/library\\\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\\\/\"},\"author\":{\"name\":\"Paul M\",\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#\\\/schema\\\/person\\\/69f04ef60b945341f65db69ad70c0faf\"},\"headline\":\"How to create a cronjob to run a PHP script (cPanel)\",\"datePublished\":\"2023-02-17T18:05:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\\\/\"},\"wordCount\":462,\"publisher\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/yohost.org\\\/library\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/image-34.png\",\"keywords\":[\"create cronjob for php script in cpanel\"],\"articleSection\":[\"Linux\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\\\/\",\"url\":\"https:\\\/\\\/yohost.org\\\/library\\\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\\\/\",\"name\":\"How to create a cronjob to run a PHP script (cPanel)\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/yohost.org\\\/library\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/image-34.png\",\"datePublished\":\"2023-02-17T18:05:00+00:00\",\"description\":\"In this article we learn how to create a cronjob to run a PHP script. cPanel has an intuitive interface however there can be tricky parts.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/yohost.org\\\/library\\\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\\\/#primaryimage\",\"url\":\"https:\\\/\\\/yohost.org\\\/library\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/image-34.png\",\"contentUrl\":\"https:\\\/\\\/yohost.org\\\/library\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/image-34.png\",\"width\":542,\"height\":452},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/yohost.org\\\/library\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to create a cronjob to run a PHP script (cPanel)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#website\",\"url\":\"https:\\\/\\\/yohost.org\\\/library\\\/\",\"name\":\"Privacy Dedicated Library\",\"description\":\"Everything about privacy protection, Bitcoin, encryption and technology\",\"publisher\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/yohost.org\\\/library\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#organization\",\"name\":\"Yohost.org\",\"url\":\"https:\\\/\\\/yohost.org\\\/library\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/yohost.org\\\/library\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/yhscree2.png\",\"contentUrl\":\"https:\\\/\\\/yohost.org\\\/library\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/yhscree2.png\",\"width\":431,\"height\":466,\"caption\":\"Yohost.org\"},\"image\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/yohostorg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#\\\/schema\\\/person\\\/69f04ef60b945341f65db69ad70c0faf\",\"name\":\"Paul M\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6d68ca6c8d2150c879f23586b6734b585aca8528d5f9d6158a28685239857aee?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6d68ca6c8d2150c879f23586b6734b585aca8528d5f9d6158a28685239857aee?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6d68ca6c8d2150c879f23586b6734b585aca8528d5f9d6158a28685239857aee?s=96&d=mm&r=g\",\"caption\":\"Paul M\"},\"sameAs\":[\"https:\\\/\\\/yohost.org\\\/library\"],\"url\":\"https:\\\/\\\/yohost.org\\\/library\\\/author\\\/admin_31kufsla\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to create a cronjob to run a PHP script (cPanel)","description":"In this article we learn how to create a cronjob to run a PHP script. cPanel has an intuitive interface however there can be tricky parts.","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:\/\/yohost.org\/library\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\/","og_locale":"en_US","og_type":"article","og_title":"How to create a cronjob to run a PHP script (cPanel)","og_description":"In this article we learn how to create a cronjob to run a PHP script. cPanel has an intuitive interface however there can be tricky parts.","og_url":"https:\/\/yohost.org\/library\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\/","og_site_name":"Privacy Dedicated Library","article_published_time":"2023-02-17T18:05:00+00:00","og_image":[{"width":542,"height":452,"url":"https:\/\/i0.wp.com\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-34.png?fit=542%2C452&ssl=1","type":"image\/png"}],"author":"Paul M","twitter_card":"summary_large_image","twitter_creator":"@yohostorg","twitter_site":"@yohostorg","twitter_misc":{"Written by":"Paul M","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/yohost.org\/library\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\/#article","isPartOf":{"@id":"https:\/\/yohost.org\/library\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\/"},"author":{"name":"Paul M","@id":"https:\/\/yohost.org\/library\/#\/schema\/person\/69f04ef60b945341f65db69ad70c0faf"},"headline":"How to create a cronjob to run a PHP script (cPanel)","datePublished":"2023-02-17T18:05:00+00:00","mainEntityOfPage":{"@id":"https:\/\/yohost.org\/library\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\/"},"wordCount":462,"publisher":{"@id":"https:\/\/yohost.org\/library\/#organization"},"image":{"@id":"https:\/\/yohost.org\/library\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-34.png","keywords":["create cronjob for php script in cpanel"],"articleSection":["Linux"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/yohost.org\/library\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\/","url":"https:\/\/yohost.org\/library\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\/","name":"How to create a cronjob to run a PHP script (cPanel)","isPartOf":{"@id":"https:\/\/yohost.org\/library\/#website"},"primaryImageOfPage":{"@id":"https:\/\/yohost.org\/library\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\/#primaryimage"},"image":{"@id":"https:\/\/yohost.org\/library\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-34.png","datePublished":"2023-02-17T18:05:00+00:00","description":"In this article we learn how to create a cronjob to run a PHP script. cPanel has an intuitive interface however there can be tricky parts.","breadcrumb":{"@id":"https:\/\/yohost.org\/library\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/yohost.org\/library\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/yohost.org\/library\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\/#primaryimage","url":"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-34.png","contentUrl":"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/02\/image-34.png","width":542,"height":452},{"@type":"BreadcrumbList","@id":"https:\/\/yohost.org\/library\/how-to-create-a-cronjob-to-run-a-php-script-cpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/yohost.org\/library\/"},{"@type":"ListItem","position":2,"name":"How to create a cronjob to run a PHP script (cPanel)"}]},{"@type":"WebSite","@id":"https:\/\/yohost.org\/library\/#website","url":"https:\/\/yohost.org\/library\/","name":"Privacy Dedicated Library","description":"Everything about privacy protection, Bitcoin, encryption and technology","publisher":{"@id":"https:\/\/yohost.org\/library\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/yohost.org\/library\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/yohost.org\/library\/#organization","name":"Yohost.org","url":"https:\/\/yohost.org\/library\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/yohost.org\/library\/#\/schema\/logo\/image\/","url":"https:\/\/yohost.org\/library\/wp-content\/uploads\/2021\/12\/yhscree2.png","contentUrl":"https:\/\/yohost.org\/library\/wp-content\/uploads\/2021\/12\/yhscree2.png","width":431,"height":466,"caption":"Yohost.org"},"image":{"@id":"https:\/\/yohost.org\/library\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/yohostorg"]},{"@type":"Person","@id":"https:\/\/yohost.org\/library\/#\/schema\/person\/69f04ef60b945341f65db69ad70c0faf","name":"Paul M","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/6d68ca6c8d2150c879f23586b6734b585aca8528d5f9d6158a28685239857aee?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6d68ca6c8d2150c879f23586b6734b585aca8528d5f9d6158a28685239857aee?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6d68ca6c8d2150c879f23586b6734b585aca8528d5f9d6158a28685239857aee?s=96&d=mm&r=g","caption":"Paul M"},"sameAs":["https:\/\/yohost.org\/library"],"url":"https:\/\/yohost.org\/library\/author\/admin_31kufsla\/"}]}},"_links":{"self":[{"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/posts\/687","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/comments?post=687"}],"version-history":[{"count":3,"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/posts\/687\/revisions"}],"predecessor-version":[{"id":732,"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/posts\/687\/revisions\/732"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/media\/730"}],"wp:attachment":[{"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/media?parent=687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/categories?post=687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/tags?post=687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}