{"id":846,"date":"2016-08-29T13:17:19","date_gmt":"2016-08-29T13:17:19","guid":{"rendered":"http:\/\/cloudhost.com.ng\/blog\/?p=846"},"modified":"2016-08-29T13:20:19","modified_gmt":"2016-08-29T13:20:19","slug":"846-2","status":"publish","type":"post","link":"https:\/\/cloudhost.com.ng\/blog\/846-2\/","title":{"rendered":"How Cron Jobs Works and How to Use It: Cloudhost"},"content":{"rendered":"<div id=\"content\" class=\"page view\">\n<div class=\"page-metadata\">\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<\/div>\n<div id=\"main-content\" class=\"wiki-content\">\n<div class=\"contentLayout2\">\n<div class=\"columnLayout two-right-sidebar\">\n<div class=\"cell normal\">\n<div class=\"innerCell\">\n<div class=\"confluence-information-macro confluence-information-macro-note conf-macro output-block\">\n<p class=\"title\"><em>Note:\u00a0Exercise caution when you schedule cron jobs. If you schedule them to run too often, they may reduce your server&#8217;s performance.\u00a0<\/em><\/p>\n<\/div>\n<ul>\n<li id=\"CronJobs-Addacronemail\"><em><strong>Add a cron email<\/strong><\/em><\/li>\n<\/ul>\n<p>The\u00a0<em>Cron Email<\/em>\u00a0section of the interface allows you to enter an email address where\u00a0notifications will be sent to when your cron jobs run. To set an email address, perform the following steps:<\/p>\n<ol>\n<li>In the\u00a0<em>Email<\/em>\u00a0text box, enter the email address you wish\u00a0to\u00a0receive the notifications.<\/li>\n<li>Then Click\u00a0<em>Update Email<\/em>.<\/li>\n<\/ol>\n<p><a href=\"http:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-312.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-850\" src=\"http:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-312.png\" alt=\"Screenshot (312)\" width=\"1345\" height=\"629\" srcset=\"https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-312.png 1345w, https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-312-300x140.png 300w, https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-312-768x359.png 768w, https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-312-1024x479.png 1024w, https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-312-624x292.png 624w\" sizes=\"(max-width: 1345px) 100vw, 1345px\" \/><\/a><\/p>\n<\/div>\n<\/div>\n<div class=\"cell aside\"><\/div>\n<\/div>\n<div class=\"columnLayout single\">\n<div class=\"cell normal\">\n<div class=\"innerCell\">\n<div class=\"patternTopic\">\n<ul>\n<li id=\"CronJobs-Addacronjob\"><strong><em>Add a cron job<\/em><\/strong><\/li>\n<\/ul>\n<p>To create a cron job,<\/p>\n<ol>\n<li>Select the interval at which you wish to run the cron job from the appropriate menus, or enter the values in the text boxes.\n<ul>\n<li><em>Common Settings<\/em>\u00a0\u2014 This menu 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.<\/li>\n<li><em>Minute<\/em>\u00a0\u2014 Use this menu to select the number of minutes between each time the cron job runs, or the minute of each hour on which you wish to run the cron job.<\/li>\n<li><em>Hour<\/em>\u00a0\u2014 Use this menu to select the number of hours between each time the cron job runs, or the hour of each day on which you wish to run the cron job.<\/li>\n<li><em>Day<\/em>\u00a0\u2014 Use this menu to select the number of days between each time the cron job runs, or the day of the month on which you wish to run the cron job.<\/li>\n<li><em>Month<\/em>\u00a0\u2014 Use this menu to select the 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.<\/li>\n<li><em>Weekday<\/em>\u00a0\u2014 Use this menu to select the days of the week on which you wish to run the cron job.<\/li>\n<\/ul>\n<\/li>\n<li>In the\u00a0<em>Command<\/em>\u00a0text box, enter the command that you wish the system to run.\n<div class=\"confluence-information-macro confluence-information-macro-note conf-macro output-block\">\n<p class=\"title\"><em>Notes:<\/em><\/p>\n<div class=\"confluence-information-macro-body\">\n<ul>\n<li><em>Specify the absolute path to the command that you wish to run. For example, if you wish to run the <code>public_html\/index.php<\/code> file in your home directory, enter the following command:<\/em>\n<div class=\"code panel pdl conf-macro output-block\">\n<div class=\"codeContent panelContent pdl\">\n<div>\n<div id=\"highlighter_919541\" class=\"syntaxhighlighter sh-confluence nogutter java\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"code\">\n<div class=\"container\" title=\"Hint: double-click to select code\">\n<div class=\"line number1 index0 alt2\"><em><code class=\"java plain\">\/home\/user\/public_html\/index.php<\/code><\/em><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<li><em>To disable notifications for a specific cron job, add the following line to the command:<\/em>\n<div class=\"code panel pdl conf-macro output-block\">\n<div class=\"codeContent panelContent pdl\">\n<div>\n<div id=\"highlighter_113836\" class=\"syntaxhighlighter sh-confluence nogutter bash\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"code\">\n<div class=\"container\" title=\"Hint: double-click to select code\">\n<div class=\"line number1 index0 alt2\"><em><code class=\"bash plain\">&gt;<\/code><code class=\"bash plain\">\/dev\/null<\/code><code class=\"bash plain\">2&gt;&amp;1<\/code><\/em><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"confluence-information-macro confluence-information-macro-warning conf-macro output-block\">\n<p class=\"title\"><em>Important:<\/em><\/p>\n<div class=\"confluence-information-macro-body\">\n<ul>\n<li><em>You <strong>must<\/strong> specify settings for the Minute, Hour, Day, Month, Weekday, and Command text boxes.<\/em><\/li>\n<li><em>Exercise <strong>extreme<\/strong> caution when you use the\u00a0<code>rm<\/code> command in a cron job. If you do not declare the correct options, you may delete your home directory&#8217;s data.<\/em><\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/li>\n<li>Click\u00a0<strong><em>Add New Cron Job<\/em>.<\/strong><\/li>\n<\/ol>\n<\/div>\n<p>&nbsp;<\/p>\n<div class=\"patternTopic\">\n<ul>\n<li id=\"CronJobs-Viewexistingcronjobs\"><em><strong>View existing cron jobs<\/strong><\/em><\/li>\n<\/ul>\n<p>The\u00a0<em>Current Cron Jobs<\/em>\u00a0table displays your existing cron jobs.<\/p>\n<ul>\n<li id=\"CronJobs-Editacronjob\"><em><strong>Edit a cron job<\/strong><\/em><\/li>\n<\/ul>\n<p>To edit a cron job, perform the following steps:<\/p>\n<ol>\n<li>Locate the cron job that you wish to edit and click\u00a0<em>Edit<\/em>.<\/li>\n<li>Edit the settings that you wish to change and click\u00a0<em>Edit Line<\/em>.<\/li>\n<\/ol>\n<ul>\n<li id=\"CronJobs-Deleteacronjob\"><em><strong>Delete a cron job<\/strong><\/em><\/li>\n<\/ul>\n<p>To delete a cron job, perform the following steps:<\/p>\n<ol>\n<li>Click\u00a0<em>Delete<\/em>\u00a0next to the cron job that you wish to delete.<\/li>\n<li>Click\u00a0<em>Delete<\/em>.<\/li>\n<\/ol>\n<p><a href=\"http:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-310.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-849\" src=\"http:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-310.png\" alt=\"Delete_Cron_Jobs_Cloudhost\" width=\"1314\" height=\"174\" srcset=\"https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-310.png 1314w, https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-310-300x40.png 300w, https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-310-768x102.png 768w, https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-310-1024x136.png 1024w, https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-310-624x83.png 624w\" sizes=\"(max-width: 1314px) 100vw, 1314px\" \/><\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"page view\">\n<div>\n<h3>To access \u00a0Cron Jobs<span id=\"pageHeading\">\u00a0<\/span><span style=\"font-size: 16px;line-height: 1.5\">for your website:<\/span><\/h3>\n<ol>\n<li><a href=\"http:\/\/cloudhost.com.ng\/blog\/cant-login-from-cpanel\/\">Log into your cPanel account<\/a>.<\/li>\n<li>Click the<strong><span class=\"Apple-converted-space\">\u00a0Cron Jobs\u00a0<\/span><\/strong>icon in the section.<\/li>\n<\/ol>\n<\/div>\n<div><\/div>\n<div>\u00a0<a href=\"http:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-311.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-847\" src=\"http:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-311.png\" alt=\"Screenshot (311)\" width=\"972\" height=\"216\" srcset=\"https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-311.png 972w, https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-311-300x67.png 300w, https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-311-768x171.png 768w, https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-311-624x139.png 624w\" sizes=\"(max-width: 972px) 100vw, 972px\" \/><\/a><\/div>\n<div>3. Now you will be redirected to the <strong>Cron Jobs\u00a0<\/strong>Interface.<\/div>\n<div><\/div>\n<div><a href=\"http:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-309.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-848\" src=\"http:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-309.png\" alt=\"Cron_Jobs_Cloudhost\" width=\"1343\" height=\"641\" srcset=\"https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-309.png 1343w, https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-309-300x143.png 300w, https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-309-768x367.png 768w, https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-309-1024x489.png 1024w, https:\/\/cloudhost.com.ng\/blog\/wp-content\/uploads\/2016\/08\/Screenshot-309-624x298.png 624w\" sizes=\"(max-width: 1343px) 100vw, 1343px\" \/><\/a><\/div>\n<div><\/div>\n<div style=\"background: #ffa500\">\n<p style=\"text-align: center;font-size: 19px\"><strong><a href=\"http:\/\/secure.cloudhost.com.ng\">Get Started with Us\u00a0<\/a><\/strong><\/p>\n<\/div>\n<div class=\"form-group\"><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<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. Note:\u00a0Exercise caution when you schedule cron [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":851,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"yst_prominent_words":[],"class_list":["post-846","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel"],"_links":{"self":[{"href":"https:\/\/cloudhost.com.ng\/blog\/wp-json\/wp\/v2\/posts\/846"}],"collection":[{"href":"https:\/\/cloudhost.com.ng\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudhost.com.ng\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudhost.com.ng\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudhost.com.ng\/blog\/wp-json\/wp\/v2\/comments?post=846"}],"version-history":[{"count":3,"href":"https:\/\/cloudhost.com.ng\/blog\/wp-json\/wp\/v2\/posts\/846\/revisions"}],"predecessor-version":[{"id":854,"href":"https:\/\/cloudhost.com.ng\/blog\/wp-json\/wp\/v2\/posts\/846\/revisions\/854"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudhost.com.ng\/blog\/wp-json\/wp\/v2\/media\/851"}],"wp:attachment":[{"href":"https:\/\/cloudhost.com.ng\/blog\/wp-json\/wp\/v2\/media?parent=846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudhost.com.ng\/blog\/wp-json\/wp\/v2\/categories?post=846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudhost.com.ng\/blog\/wp-json\/wp\/v2\/tags?post=846"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/cloudhost.com.ng\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}