{"id":311,"date":"2018-02-23T09:23:26","date_gmt":"2018-02-23T09:23:26","guid":{"rendered":"http:\/\/linuxresellerwebhosting.in\/blog\/?p=311"},"modified":"2018-02-23T09:23:26","modified_gmt":"2018-02-23T09:23:26","slug":"setup-cron-job-cpanel","status":"publish","type":"post","link":"https:\/\/linuxresellerwebhosting.in\/blog\/setup-cron-job-cpanel\/","title":{"rendered":"How to Setup Cron Job in cPanel"},"content":{"rendered":"<p>Hello Everyone !!<\/p>\n<p>Today we are going to see how to setup Cron job in cPanel. You not always sit in-front of system to do the task. Some time you have to do some task without user. That time you can schedule your task on time through Cron Jobs on linux. Now a days there so many automation tools available to perform it.<\/p>\n<p>But in this articles, We are going set up Cron Jobs with help of cPanel.<\/p>\n<p>Cron jobs allow you to automate certain commands or scripts on your site. You can set a command or script to run at a specific time every day, week, etc. For example, you could set a cron job to delete temporary files every week to free up disk space.<\/p>\n<p>Now let&#8217;s see how to do it.<\/p>\n<p>Step 1 : Login to your cPanel.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-313\" src=\"http:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/login-1-300x166.png\" alt=\"\" width=\"513\" height=\"284\" srcset=\"https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/login-1-300x166.png 300w, https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/login-1-768x425.png 768w, https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/login-1-1024x567.png 1024w, https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/login-1.png 1146w\" sizes=\"auto, (max-width: 513px) 100vw, 513px\" \/><\/p>\n<p>Step 2 : You can find Cron Jobs under Advanced option Or\u00a0 type Cron Jobs on search box.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-314\" src=\"http:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/cron-300x41.png\" alt=\"\" width=\"520\" height=\"71\" srcset=\"https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/cron-300x41.png 300w, https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/cron-768x106.png 768w, https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/cron.png 938w\" sizes=\"auto, (max-width: 520px) 100vw, 520px\" \/><\/p>\n<p>Step 3 : Once you entered, You can find numerous options to setup Cron Jobs.<\/p>\n<p>a ) Email :<\/p>\n<p>You can update emails address to send an email with output every time the cron job runs.\u00a0 Else <span id=\"descLongTxt\" class=\"description\">If you do not want an email to be sent for an individual cron job, you can redirect the command\u2019s output to \/dev\/null<\/span>. For example : <span id=\"descLongTxt\" class=\"description\"> <\/span> <code id=\"descLongTxtExample\"><br \/>\nmycommand &gt;\/dev\/null 2&gt;&amp;1<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-315\" src=\"http:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/email-300x59.png\" alt=\"\" width=\"534\" height=\"105\" srcset=\"https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/email-300x59.png 300w, https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/email-768x152.png 768w, https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/email.png 998w\" sizes=\"auto, (max-width: 534px) 100vw, 534px\" \/><\/p>\n<p>b ) Add New Cron Job:<\/p>\n<p>In Common settings, You can set any specific time on when command will be executed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-316\" src=\"http:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/common-300x183.png\" alt=\"\" width=\"521\" height=\"318\" srcset=\"https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/common-300x183.png 300w, https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/common-768x469.png 768w, https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/common.png 978w\" sizes=\"auto, (max-width: 521px) 100vw, 521px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Select the interval at which you wish to run the cron job from the appropriate menus, or enter the values in the text boxes.<\/p>\n<p><strong>Common Settings :<\/strong><\/p>\n<p>This option allows you to select a commonly-used interval. The system will configure the appropriate settings in the\u00a0<em>Minute<\/em>,\u00a0<em>Hour<\/em>,\u00a0<em>Day<\/em>,\u00a0<em>Month<\/em>, and\u00a0<em>Weekday<\/em>\u00a0text boxes for you.<\/p>\n<p>Note :<\/p>\n<p>If the wildcard characters (<code>*<\/code>) and intervals confuse you, this menu is an excellent way to learn how to configure the other fields.<\/p>\n<p><strong>Minute<\/strong> : This Option allows you to configure the minute of each hour on which the command should run.<\/p>\n<p><strong>Hour<\/strong> : This Option allows you to configure the hour of each day on which the command should run.<\/p>\n<p><strong>Day<\/strong> : This Option allows you to configure the day of each month on which the command should run.<\/p>\n<p><strong>Month<\/strong> : This Option allows you to configure number of months between each time the cron job runs, or the month of the year in which you wish to run the cron job.<\/p>\n<p><strong>Weekday<\/strong> : Use this menu to select the days of the week on which you wish to run the cron job.<\/p>\n<p><strong>Command Text Box :<\/strong><\/p>\n<p>In Command text box, you have enter the full command that you want execute on the schedule the time.<\/p>\n<p>Example :<\/p>\n<pre class=\"syntaxhighlighter-pre\" data-syntaxhighlighter-params=\"brush: perl; gutter: false; theme: Default\" data-theme=\"Default\">\/home\/user\/public_html\/index.php<\/pre>\n<p><strong>Edit a Cron Job :<\/strong><\/p>\n<p>Click the Edit settings on the cron Job under current cron Jobs that you wish to change.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-317\" src=\"http:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/edit-300x39.png\" alt=\"\" width=\"438\" height=\"57\" srcset=\"https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/edit-300x39.png 300w, https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/edit-768x100.png 768w, https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/edit-1024x133.png 1024w, https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/edit.png 1274w\" sizes=\"auto, (max-width: 438px) 100vw, 438px\" \/><\/p>\n<p><strong>Delete a Cron Job :<\/strong><\/p>\n<p>Click delete option on the right end of the cron job.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-318\" src=\"http:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/del-300x41.png\" alt=\"\" width=\"432\" height=\"59\" srcset=\"https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/del-300x41.png 300w, https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/del-768x104.png 768w, https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/del-1024x139.png 1024w, https:\/\/linuxresellerwebhosting.in\/blog\/wp-content\/uploads\/2018\/02\/del.png 1255w\" sizes=\"auto, (max-width: 432px) 100vw, 432px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Hope this tutorial help you configure cron jobs on cPanel \ud83d\ude42<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello Everyone !! Today we are going to see how to setup Cron job in cPanel. You not always sit<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[1],"tags":[],"class_list":["post-311","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/comments?post=311"}],"version-history":[{"count":3,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/311\/revisions"}],"predecessor-version":[{"id":320,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/311\/revisions\/320"}],"wp:attachment":[{"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/media?parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/categories?post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/tags?post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}