{"id":6579,"date":"2018-12-21T05:04:21","date_gmt":"2018-12-21T05:04:21","guid":{"rendered":"https:\/\/www.siliconhouse.net\/support\/?page_id=6579"},"modified":"2018-12-21T05:06:04","modified_gmt":"2018-12-21T05:06:04","slug":"how-to-set-scheduled-task-via-cron-jobs-in-cpanel","status":"publish","type":"page","link":"https:\/\/www.siliconhouse.net\/support\/how-to-set-scheduled-task-via-cron-jobs-in-cpanel\/","title":{"rendered":"How to set cron job in cPanel ?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Cron jobs are scheduled tasks that the system runs at predefined times or intervals. Typically, a cron job contains a series of simple tasks that the system runs from a script file. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Cron Email feature sends an email with the output of your command, if any, every time the Cron job runs. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">[1] Login to cPanel<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">[2] Cron Email setion<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">[3] Disable email notifications<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To disable email notifications for a single cron job, perform the following steps:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you don\u2019t want to receive any email notifications, you can instruct the server to redirect the output to \/dev\/null by placing the following code after your command: \/dev\/null 2>&amp;1<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">[4] Click on Save<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">[5] Add Cron Job<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Select the interval at which you wish to run the scheduled task from the appropriate menus, or enter the values in the text boxes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to run a PHP script located in the public_html directory, the correct command will be: <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/usr\/local\/bin\/php \/home\/cPaneluser\/public_html\/yourscript.php <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/usr\/bin\/php -q \/home\/cPaneluser\/public_html\/yourscript.php<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can set the timings. Please make sure that it must be set above 45 minutes timing interval.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After adding the new scheduled task , cPanel will show you a message saying that it was created successfully, or it will show you an error message if something went wrong. If all went well, you should see your new cron job under \u201cCurrent Cron Jobs.\u201d You can edit or delete your cron job by clicking on the appropriate link under \u201cACTIONS.\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Edit a cron job : <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To edit a cron job, perform the following steps:<\/p>\n\n\n<p>[a] Locate the cron job that you wish to edit and click Edit. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> <\/p>\n\n\n<p>[b] Edit the settings that you wish to change and click Edit Line. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">  NOTE: If your script does not generate any output, it is possible that notification emails are not sent either, however, the cron job is working. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cron jobs are scheduled tasks that the system runs at predefined times or intervals. Typically, a cron job contains a<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-6579","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to run scripts via Cron Jobs features in cPanel ?<\/title>\n<meta name=\"description\" content=\"Cron job allow you to automate certain commands or scripts on your site.Please make sure that cron must be set above 45 minutes timing interval.\" \/>\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.siliconhouse.net\/support\/how-to-set-scheduled-task-via-cron-jobs-in-cpanel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to run scripts via Cron Jobs features in cPanel ?\" \/>\n<meta property=\"og:description\" content=\"Cron job allow you to automate certain commands or scripts on your site.Please make sure that cron must be set above 45 minutes timing interval.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.siliconhouse.net\/support\/how-to-set-scheduled-task-via-cron-jobs-in-cpanel\/\" \/>\n<meta property=\"og:site_name\" content=\"Silicon House - Reseller Hosting - Dedicated Servers - Cloud\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/siliconhouse.net\" \/>\n<meta property=\"article:modified_time\" content=\"2018-12-21T05:06:04+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@siliconhouse\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.siliconhouse.net\\\/support\\\/how-to-set-scheduled-task-via-cron-jobs-in-cpanel\\\/\",\"url\":\"https:\\\/\\\/www.siliconhouse.net\\\/support\\\/how-to-set-scheduled-task-via-cron-jobs-in-cpanel\\\/\",\"name\":\"How to run scripts via Cron Jobs features in cPanel ?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.siliconhouse.net\\\/support\\\/#website\"},\"datePublished\":\"2018-12-21T05:04:21+00:00\",\"dateModified\":\"2018-12-21T05:06:04+00:00\",\"description\":\"Cron job allow you to automate certain commands or scripts on your site.Please make sure that cron must be set above 45 minutes timing interval.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.siliconhouse.net\\\/support\\\/how-to-set-scheduled-task-via-cron-jobs-in-cpanel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.siliconhouse.net\\\/support\\\/how-to-set-scheduled-task-via-cron-jobs-in-cpanel\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.siliconhouse.net\\\/support\\\/how-to-set-scheduled-task-via-cron-jobs-in-cpanel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.siliconhouse.net\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to set cron job in cPanel ?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.siliconhouse.net\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/www.siliconhouse.net\\\/support\\\/\",\"name\":\"Silicon House - Reseller Hosting - Dedicated Servers - Cloud\",\"description\":\"Reseller Hosting - Dedicated Servers - Cloud\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.siliconhouse.net\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.siliconhouse.net\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.siliconhouse.net\\\/support\\\/#organization\",\"name\":\"Silicon House\",\"url\":\"https:\\\/\\\/www.siliconhouse.net\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.siliconhouse.net\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.siliconhouse.net\\\/support\\\/wp-content\\\/uploads\\\/2016\\\/10\\\/siliconhouse-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.siliconhouse.net\\\/support\\\/wp-content\\\/uploads\\\/2016\\\/10\\\/siliconhouse-logo.png\",\"width\":42,\"height\":40,\"caption\":\"Silicon House\"},\"image\":{\"@id\":\"https:\\\/\\\/www.siliconhouse.net\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/siliconhouse.net\",\"https:\\\/\\\/x.com\\\/siliconhouse\",\"https:\\\/\\\/www.youtube.com\\\/siliconhouse\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to run scripts via Cron Jobs features in cPanel ?","description":"Cron job allow you to automate certain commands or scripts on your site.Please make sure that cron must be set above 45 minutes timing interval.","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.siliconhouse.net\/support\/how-to-set-scheduled-task-via-cron-jobs-in-cpanel\/","og_locale":"en_US","og_type":"article","og_title":"How to run scripts via Cron Jobs features in cPanel ?","og_description":"Cron job allow you to automate certain commands or scripts on your site.Please make sure that cron must be set above 45 minutes timing interval.","og_url":"https:\/\/www.siliconhouse.net\/support\/how-to-set-scheduled-task-via-cron-jobs-in-cpanel\/","og_site_name":"Silicon House - Reseller Hosting - Dedicated Servers - Cloud","article_publisher":"https:\/\/www.facebook.com\/siliconhouse.net","article_modified_time":"2018-12-21T05:06:04+00:00","twitter_card":"summary_large_image","twitter_site":"@siliconhouse","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.siliconhouse.net\/support\/how-to-set-scheduled-task-via-cron-jobs-in-cpanel\/","url":"https:\/\/www.siliconhouse.net\/support\/how-to-set-scheduled-task-via-cron-jobs-in-cpanel\/","name":"How to run scripts via Cron Jobs features in cPanel ?","isPartOf":{"@id":"https:\/\/www.siliconhouse.net\/support\/#website"},"datePublished":"2018-12-21T05:04:21+00:00","dateModified":"2018-12-21T05:06:04+00:00","description":"Cron job allow you to automate certain commands or scripts on your site.Please make sure that cron must be set above 45 minutes timing interval.","breadcrumb":{"@id":"https:\/\/www.siliconhouse.net\/support\/how-to-set-scheduled-task-via-cron-jobs-in-cpanel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.siliconhouse.net\/support\/how-to-set-scheduled-task-via-cron-jobs-in-cpanel\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.siliconhouse.net\/support\/how-to-set-scheduled-task-via-cron-jobs-in-cpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.siliconhouse.net\/support\/"},{"@type":"ListItem","position":2,"name":"How to set cron job in cPanel ?"}]},{"@type":"WebSite","@id":"https:\/\/www.siliconhouse.net\/support\/#website","url":"https:\/\/www.siliconhouse.net\/support\/","name":"Silicon House - Reseller Hosting - Dedicated Servers - Cloud","description":"Reseller Hosting - Dedicated Servers - Cloud","publisher":{"@id":"https:\/\/www.siliconhouse.net\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.siliconhouse.net\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.siliconhouse.net\/support\/#organization","name":"Silicon House","url":"https:\/\/www.siliconhouse.net\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.siliconhouse.net\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.siliconhouse.net\/support\/wp-content\/uploads\/2016\/10\/siliconhouse-logo.png","contentUrl":"https:\/\/www.siliconhouse.net\/support\/wp-content\/uploads\/2016\/10\/siliconhouse-logo.png","width":42,"height":40,"caption":"Silicon House"},"image":{"@id":"https:\/\/www.siliconhouse.net\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/siliconhouse.net","https:\/\/x.com\/siliconhouse","https:\/\/www.youtube.com\/siliconhouse"]}]}},"_links":{"self":[{"href":"https:\/\/www.siliconhouse.net\/support\/wp-json\/wp\/v2\/pages\/6579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.siliconhouse.net\/support\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.siliconhouse.net\/support\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.siliconhouse.net\/support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.siliconhouse.net\/support\/wp-json\/wp\/v2\/comments?post=6579"}],"version-history":[{"count":2,"href":"https:\/\/www.siliconhouse.net\/support\/wp-json\/wp\/v2\/pages\/6579\/revisions"}],"predecessor-version":[{"id":6602,"href":"https:\/\/www.siliconhouse.net\/support\/wp-json\/wp\/v2\/pages\/6579\/revisions\/6602"}],"wp:attachment":[{"href":"https:\/\/www.siliconhouse.net\/support\/wp-json\/wp\/v2\/media?parent=6579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}