{"id":291,"date":"2010-06-25T22:02:16","date_gmt":"2010-06-25T16:32:16","guid":{"rendered":"http:\/\/JitendraZaa.com\/blog\/?p=291"},"modified":"2010-06-25T22:02:16","modified_gmt":"2010-06-25T16:32:16","slug":"create-cron-job-to-run-php-script-in-cpanel","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/others\/linux\/create-cron-job-to-run-php-script-in-cpanel\/","title":{"rendered":"Create Cron job to run PHP Script in Cpanel"},"content":{"rendered":"<p>Hi All,<\/p>\n<p>Today i just want to share that how to create \u00a0a cron job in Cpanel to run the PHP script.<\/p>\n<p>I hope everyone knows that what is Cron job : it is the task schedule in Linux which will run on predefined time interval. its same concept like schedule tasks in Windows OS.<\/p>\n<p>To create the cron job, open the Cpanel and select &#8220;<strong>cron jobs&#8221;.<\/strong><\/p>\n<p><strong><span style=\"font-weight: normal;\"><strong><img data-recalc-dims=\"1\" decoding=\"async\" style=\"padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; font-size: 12px; vertical-align: baseline; background-color: transparent; margin: 0px; border: initial none initial;\" src=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2010\/06\/Select-Cron-job.jpg?ssl=1\" alt=\"Select Cron job in Cpanel\" align=\"none\" \/><\/strong><\/span><\/strong><\/p>\n<p><strong><span style=\"font-weight: normal;\">You can see that in drop down list there are lots of common schedules of crone job, you can select it, or create your own schedules.<\/span><\/strong><\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2010\/06\/Common-Setting-in-Cron1.jpg?ssl=1\" alt=\"Common settings in Cpanel\" align=\"none\" \/><\/p>\n<p>In Command text box, write the PHP program path and file to be executed like:<\/p>\n<p><strong><span style=\"color: #ff0000;\">\/usr\/local\/bin\/php<\/span><\/strong> -q <strong><span style=\"color: #0000ff;\">\/home\/&lt;username&gt;\/script.php<\/span><\/strong><\/p>\n<p><span style=\"color: #0000ff;\"><strong><span style=\"color: #444444; font-weight: normal;\"><img data-recalc-dims=\"1\" decoding=\"async\" style=\"background-color: #ffffff; padding: 2px; margin: 0px; border: 10px solid #e2e2e2;\" src=\"https:\/\/i0.wp.com\/img340.imageshack.us\/img340\/4747\/66319117.jpg?w=300\" alt=\"\"  \/><\/span><br \/>\n<\/strong><\/span><\/p>\n<p><strong><span style=\"color: #0000ff;\"> <\/span><\/strong><\/p>\n<div>to find the path to php,<\/div>\n<div>log on to the server with SSH, then run this command:<\/div>\n<div>&#8220;\u201d&#8221;\u201d&#8221;\u201d&#8221;\u201d&#8221;\u201d&#8221;\u201d-<\/div>\n<div><strong>which php<\/strong><\/div>\n<div><strong>or<\/strong><\/div>\n<div><strong>whereis php<\/strong><\/div>\n<div>&#8220;\u201d&#8221;\u201d&#8221;\u201d&#8221;\u201d&#8221;\u201d&#8221;\u201d&#8221;\u201d-<\/div>\n<div>This will give you the path to the php executable, probably:<\/div>\n<div>\/usr\/local\/bin\/php<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Hi All, Today i just want to share that how to create \u00a0a cron job in Cpanel to run the PHP script. I hope everyone knows that what is Cron job : it is the task schedule in Linux which will run on predefined time interval. its same concept like schedule tasks in Windows OS. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"jz_research_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[27],"tags":[66,339,155],"class_list":["post-291","post","type-post","status-publish","format-standard","hentry","category-linux","tag-cron-job","tag-linux","tag-php"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":3495,"url":"https:\/\/www.jitendrazaa.com\/blog\/webtech\/how-to-make-wordpress-site-fast-and-minimize-cpu-usage\/","url_meta":{"origin":291,"position":0},"title":"How to make WordPress blog faster and minimize CPU Usage","author":"Jitendra","date":"October 6, 2013","format":false,"excerpt":"In this article, I will share my personal experience regarding this blog performance and nightmares of disabling website everyday because of CPU Utilization. I tried all my best however I was unable to figure out the cause of high CPU Usage by wordPress. I tried many articles on Google and\u2026","rel":"","context":"In &quot;HTML&quot;","block_context":{"text":"HTML","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/webtech\/web\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2422,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/quartz-framework-tutorial-with-example-schedule-job-in-java\/","url_meta":{"origin":291,"position":1},"title":"Quartz framework tutorial with example &#8211; Schedule job in Java","author":"Jitendra","date":"September 22, 2011","format":false,"excerpt":"Tutorial of the Quartz framework for Java. Schedule job without loosing the performance of the application","rel":"","context":"In &quot;JAVA&quot;","block_context":{"text":"JAVA","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2386,"url":"https:\/\/www.jitendrazaa.com\/blog\/webtech\/cpanel-filezilla-ftp-all-code-converted-in-single-line\/","url_meta":{"origin":291,"position":2},"title":"Cpanel &#8211; FileZilla FTP &#8211; All code converted in single line","author":"Jitendra","date":"August 12, 2011","format":false,"excerpt":"While transferring the php, html or javascript file using filezilla ftp client to the cpanel - all the codes converted into single line","rel":"","context":"In &quot;Web Technology&quot;","block_context":{"text":"Web Technology","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/webtech\/"},"img":{"alt_text":"FileZilla Settings","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/08\/FileZilla-Settings.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1848,"url":"https:\/\/www.jitendrazaa.com\/blog\/webtech\/cpanel-php-500-internal-server-error\/","url_meta":{"origin":291,"position":3},"title":"CPanel &#8211; PHP &#8211; 500 internal server error","author":"Jitendra","date":"March 28, 2011","format":false,"excerpt":"Error Resolved - CPanel - PHP - 500 internal server error","rel":"","context":"In &quot;Web Technology&quot;","block_context":{"text":"Web Technology","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/webtech\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":31396,"url":"https:\/\/www.jitendrazaa.com\/blog\/others\/tips\/openclaw-auto-recovery-config-fix-guide-2026\/","url_meta":{"origin":291,"position":4},"title":"OpenClaw Auto-Recovery &amp; Config Fix Guide | 2026","author":"Jitendra Zaa","date":"February 4, 2026","format":false,"excerpt":"Master OpenClaw auto-recovery with this comprehensive guide covering config corruption fixes, backup restoration cascade, gateway health monitoring with 5 health checks, and intelligent error auto-remediation for 24\/7 AI assistant uptime.","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/ai\/"},"img":{"alt_text":"OpenClaw Auto-Recovery & Config Fix Guide - Featured Image","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2026\/02\/OpenClaw-Auto-Recovery-Reliability-Guide-featured.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2026\/02\/OpenClaw-Auto-Recovery-Reliability-Guide-featured.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2026\/02\/OpenClaw-Auto-Recovery-Reliability-Guide-featured.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2026\/02\/OpenClaw-Auto-Recovery-Reliability-Guide-featured.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2026\/02\/OpenClaw-Auto-Recovery-Reliability-Guide-featured.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":31368,"url":"https:\/\/www.jitendrazaa.com\/blog\/others\/tips\/openclaw-troubleshooting-guide-7-common-errors-and-how-to\/","url_meta":{"origin":291,"position":5},"title":"OpenClaw Troubleshooting Guide: 7 Common Errors and How to Fix Them | February 2026","author":"Jitendra Zaa","date":"February 3, 2026","format":false,"excerpt":"Fix OpenClaw errors fast: Brave API rate limits, SearXNG Docker issues, LLM command hallucinations, and agent workflow issues with step-by-step solutions.","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/ai\/"},"img":{"alt_text":"OpenClaw Troubleshooting Guide - 7 Common Errors and How to Fix Them - Featured Image","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2026\/02\/OpenClaw-Troubleshooting-Guide-featured.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2026\/02\/OpenClaw-Troubleshooting-Guide-featured.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2026\/02\/OpenClaw-Troubleshooting-Guide-featured.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2026\/02\/OpenClaw-Troubleshooting-Guide-featured.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2026\/02\/OpenClaw-Troubleshooting-Guide-featured.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=291"}],"version-history":[{"count":0,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/291\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}