CINXE.COM
Our complete cron job guide for 2024 - UptimeRobot Knowledge Hub
<!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css"> <style> @charset "UTF-8"; :root { --wp--preset--font-size--normal: 16px; --wp--preset--font-size--huge: 42px; } </style> <meta name='robots' content='index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1' /> <style>img:is([sizes="auto" i], [sizes^="auto," i]) { contain-intrinsic-size: 3000px 1500px }</style> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- This site is optimized with the Yoast SEO plugin v23.6 - https://yoast.com/wordpress/plugins/seo/ --> <title>Our complete cron job guide for 2024 - UptimeRobot Knowledge Hub</title> <meta name="description" content="What are cron jobs and how do they work? Learn everything you need in our detailed guide and set up your first cron job or monitoring." /> <link rel="canonical" href="https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/" /> <meta property="og:locale" content="en_US" /> <meta property="og:type" content="article" /> <meta property="og:title" content="Our complete cron job guide for 2024 - UptimeRobot Knowledge Hub" /> <meta property="og:description" content="What are cron jobs and how do they work? Learn everything you need in our detailed guide and set up your first cron job or monitoring." /> <meta property="og:url" content="https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/" /> <meta property="og:site_name" content="UptimeRobot Knowledge Hub" /> <meta property="article:published_time" content="2024-07-24T09:27:08+00:00" /> <meta property="article:modified_time" content="2024-07-24T09:27:09+00:00" /> <meta property="og:image" content="https://uptimerobot.com/blog/wp-content/uploads/2024/01/Screenshot-2024-01-22-at-15.48.39.png" /> <meta name="author" content="Laura Clayton" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:label1" content="Written by" /> <meta name="twitter:data1" content="Laura Clayton" /> <meta name="twitter:label2" content="Est. reading time" /> <meta name="twitter:data2" content="13 minutes" /> <script type="application/ld+json" class="yoast-schema-graph">{"@context":"https://schema.org","@graph":[{"@type":"Article","@id":"https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/#article","isPartOf":{"@id":"https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/"},"author":{"name":"Laura Clayton","@id":"https://uptimerobot.com/knowledge-hub/#/schema/person/c05598f15bcbd26ed4d53240dff2ae34"},"headline":"Our complete cron job guide for 2024","datePublished":"2024-07-24T09:27:08+00:00","dateModified":"2024-07-24T09:27:09+00:00","mainEntityOfPage":{"@id":"https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/"},"wordCount":2803,"publisher":{"@id":"https://uptimerobot.com/knowledge-hub/#organization"},"image":{"@id":"https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/#primaryimage"},"thumbnailUrl":"https://uptimerobot.com/blog/wp-content/uploads/2024/01/Screenshot-2024-01-22-at-15.48.39.png","articleSection":["Cron Monitoring"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/","url":"https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/","name":"Our complete cron job guide for 2024 - UptimeRobot Knowledge Hub","isPartOf":{"@id":"https://uptimerobot.com/knowledge-hub/#website"},"primaryImageOfPage":{"@id":"https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/#primaryimage"},"image":{"@id":"https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/#primaryimage"},"thumbnailUrl":"https://uptimerobot.com/blog/wp-content/uploads/2024/01/Screenshot-2024-01-22-at-15.48.39.png","datePublished":"2024-07-24T09:27:08+00:00","dateModified":"2024-07-24T09:27:09+00:00","description":"What are cron jobs and how do they work? Learn everything you need in our detailed guide and set up your first cron job or monitoring.","breadcrumb":{"@id":"https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/#primaryimage","url":"https://uptimerobot.com/blog/wp-content/uploads/2024/01/Screenshot-2024-01-22-at-15.48.39.png","contentUrl":"https://uptimerobot.com/blog/wp-content/uploads/2024/01/Screenshot-2024-01-22-at-15.48.39.png"},{"@type":"BreadcrumbList","@id":"https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Knowledge Hub","item":"https://uptimerobot.com/knowledge-hub/"},{"@type":"ListItem","position":2,"name":"Cron Monitoring","item":"https://uptimerobot.com/knowledge-hub/cron-monitoring/"},{"@type":"ListItem","position":3,"name":"Our complete cron job guide for 2024"}]},{"@type":"WebSite","@id":"https://uptimerobot.com/knowledge-hub/#website","url":"https://uptimerobot.com/knowledge-hub/","name":"UptimeRobot Knowledge Hub","description":"","publisher":{"@id":"https://uptimerobot.com/knowledge-hub/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://uptimerobot.com/knowledge-hub/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https://uptimerobot.com/knowledge-hub/#organization","name":"UptimeRobot Knowledge Hub","url":"https://uptimerobot.com/knowledge-hub/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https://uptimerobot.com/knowledge-hub/#/schema/logo/image/","url":"https://uptimerobot.com/knowledge-hub/wp-content/uploads/2024/04/cropped-knowledge-hub-logo.png","contentUrl":"https://uptimerobot.com/knowledge-hub/wp-content/uploads/2024/04/cropped-knowledge-hub-logo.png","width":2000,"height":278,"caption":"UptimeRobot Knowledge Hub"},"image":{"@id":"https://uptimerobot.com/knowledge-hub/#/schema/logo/image/"}},{"@type":"Person","@id":"https://uptimerobot.com/knowledge-hub/#/schema/person/c05598f15bcbd26ed4d53240dff2ae34","name":"Laura Clayton","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https://uptimerobot.com/knowledge-hub/#/schema/person/image/","url":"https://uptimerobot.com/knowledge-hub/wp-content/uploads/2024/04/laura_clayton.jpeg","contentUrl":"https://uptimerobot.com/knowledge-hub/wp-content/uploads/2024/04/laura_clayton.jpeg","caption":"Laura Clayton"},"description":"Laura Claytonhas over a decade of experience in the tech industry, she brings a wealth of knowledge and insights to her articles, helping businesses maintain optimal online performance. Laura's passion for technology drives her to explore the latest in monitoring tools and techniques, making her a trusted voice in the field.","sameAs":["https://www.linkedin.com/in/laura-clayton-b00a4aa4/"],"url":"https://uptimerobot.com/knowledge-hub/author/laura/"}]}</script> <!-- / Yoast SEO plugin. --> <link rel='dns-prefetch' href='//cdnjs.cloudflare.com' /> <link href='https://fonts.gstatic.com' crossorigin rel='preconnect' /> <link href='https://fonts.googleapis.com' crossorigin rel='preconnect' /> <link rel="alternate" type="application/rss+xml" title="UptimeRobot Knowledge Hub » Feed" href="https://uptimerobot.com/knowledge-hub/feed/" /> <link rel="alternate" type="application/rss+xml" title="UptimeRobot Knowledge Hub » Comments Feed" href="https://uptimerobot.com/knowledge-hub/comments/feed/" /> <link rel="alternate" type="application/rss+xml" title="UptimeRobot Knowledge Hub » Our complete cron job guide for 2024 Comments Feed" href="https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/feed/" /> <script> window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/15.0.3\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/15.0.3\/svg\/","svgExt":".svg","source":{"concatemoji":"https:\/\/uptimerobot.com\/knowledge-hub\/wp-includes\/js\/wp-emoji-release.min.js?ver=a25461114d996c2352e4eac39db659a7"}}; /*! This file is auto-generated */ !function(i,n){var o,s,e;function c(e){try{var t={supportTests:e,timestamp:(new Date).valueOf()};sessionStorage.setItem(o,JSON.stringify(t))}catch(e){}}function p(e,t,n){e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(t,0,0);var t=new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data),r=(e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(n,0,0),new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data));return t.every(function(e,t){return e===r[t]})}function u(e,t,n){switch(t){case"flag":return n(e,"\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f","\ud83c\udff3\ufe0f\u200b\u26a7\ufe0f")?!1:!n(e,"\ud83c\uddfa\ud83c\uddf3","\ud83c\uddfa\u200b\ud83c\uddf3")&&!n(e,"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f","\ud83c\udff4\u200b\udb40\udc67\u200b\udb40\udc62\u200b\udb40\udc65\u200b\udb40\udc6e\u200b\udb40\udc67\u200b\udb40\udc7f");case"emoji":return!n(e,"\ud83d\udc26\u200d\u2b1b","\ud83d\udc26\u200b\u2b1b")}return!1}function f(e,t,n){var r="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?new OffscreenCanvas(300,150):i.createElement("canvas"),a=r.getContext("2d",{willReadFrequently:!0}),o=(a.textBaseline="top",a.font="600 32px Arial",{});return e.forEach(function(e){o[e]=t(a,e,n)}),o}function t(e){var t=i.createElement("script");t.src=e,t.defer=!0,i.head.appendChild(t)}"undefined"!=typeof Promise&&(o="wpEmojiSettingsSupports",s=["flag","emoji"],n.supports={everything:!0,everythingExceptFlag:!0},e=new Promise(function(e){i.addEventListener("DOMContentLoaded",e,{once:!0})}),new Promise(function(t){var n=function(){try{var e=JSON.parse(sessionStorage.getItem(o));if("object"==typeof e&&"number"==typeof e.timestamp&&(new Date).valueOf()<e.timestamp+604800&&"object"==typeof e.supportTests)return e.supportTests}catch(e){}return null}();if(!n){if("undefined"!=typeof Worker&&"undefined"!=typeof OffscreenCanvas&&"undefined"!=typeof URL&&URL.createObjectURL&&"undefined"!=typeof Blob)try{var e="postMessage("+f.toString()+"("+[JSON.stringify(s),u.toString(),p.toString()].join(",")+"));",r=new Blob([e],{type:"text/javascript"}),a=new Worker(URL.createObjectURL(r),{name:"wpTestEmojiSupports"});return void(a.onmessage=function(e){c(n=e.data),a.terminate(),t(n)})}catch(e){}c(n=f(s,u,p))}t(n)}).then(function(e){for(var t in e)n.supports[t]=e[t],n.supports.everything=n.supports.everything&&n.supports[t],"flag"!==t&&(n.supports.everythingExceptFlag=n.supports.everythingExceptFlag&&n.supports[t]);n.supports.everythingExceptFlag=n.supports.everythingExceptFlag&&!n.supports.flag,n.DOMReady=!1,n.readyCallback=function(){n.DOMReady=!0}}).then(function(){return e}).then(function(){var e;n.supports.everything||(n.readyCallback(),(e=n.source||{}).concatemoji?t(e.concatemoji):e.wpemoji&&e.twemoji&&(t(e.twemoji),t(e.wpemoji)))}))}((window,document),window._wpemojiSettings); </script> <style id='wp-emoji-styles-inline-css'> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 0.07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } </style> <link rel='stylesheet' id='font-awesome-css' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css' media='all' /> <style id='classic-theme-styles-inline-css'> /*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} </style> <style id='global-styles-inline-css'> :root{--wp--preset--aspect-ratio--square: 1;--wp--preset--aspect-ratio--4-3: 4/3;--wp--preset--aspect-ratio--3-4: 3/4;--wp--preset--aspect-ratio--3-2: 3/2;--wp--preset--aspect-ratio--2-3: 2/3;--wp--preset--aspect-ratio--16-9: 16/9;--wp--preset--aspect-ratio--9-16: 9/16;--wp--preset--color--black: #000000;--wp--preset--color--cyan-bluish-gray: #abb8c3;--wp--preset--color--white: #ffffff;--wp--preset--color--pale-pink: #f78da7;--wp--preset--color--vivid-red: #cf2e2e;--wp--preset--color--luminous-vivid-orange: #ff6900;--wp--preset--color--luminous-vivid-amber: #fcb900;--wp--preset--color--light-green-cyan: #7bdcb5;--wp--preset--color--vivid-green-cyan: #00d084;--wp--preset--color--pale-cyan-blue: #8ed1fc;--wp--preset--color--vivid-cyan-blue: #0693e3;--wp--preset--color--vivid-purple: #9b51e0;--wp--preset--color--contrast: var(--contrast);--wp--preset--color--contrast-2: var(--contrast-2);--wp--preset--color--contrast-3: var(--contrast-3);--wp--preset--color--base: var(--base);--wp--preset--color--base-2: var(--base-2);--wp--preset--color--base-3: var(--base-3);--wp--preset--color--accent: var(--accent);--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%);--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%);--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%);--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%);--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%);--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%);--wp--preset--gradient--blush-light-purple: linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%);--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%);--wp--preset--gradient--luminous-dusk: linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%);--wp--preset--gradient--pale-ocean: linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%);--wp--preset--gradient--electric-grass: linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%);--wp--preset--gradient--midnight: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%);--wp--preset--font-size--small: 13px;--wp--preset--font-size--medium: 20px;--wp--preset--font-size--large: 36px;--wp--preset--font-size--x-large: 42px;--wp--preset--spacing--20: 0.44rem;--wp--preset--spacing--30: 0.67rem;--wp--preset--spacing--40: 1rem;--wp--preset--spacing--50: 1.5rem;--wp--preset--spacing--60: 2.25rem;--wp--preset--spacing--70: 3.38rem;--wp--preset--spacing--80: 5.06rem;--wp--preset--shadow--natural: 6px 6px 9px rgba(0, 0, 0, 0.2);--wp--preset--shadow--deep: 12px 12px 50px rgba(0, 0, 0, 0.4);--wp--preset--shadow--sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);--wp--preset--shadow--outlined: 6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1);--wp--preset--shadow--crisp: 6px 6px 0px rgba(0, 0, 0, 1);}:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flex{display: flex;}.is-layout-flex{flex-wrap: wrap;align-items: center;}.is-layout-flex > :is(*, div){margin: 0;}body .is-layout-grid{display: grid;}.is-layout-grid > :is(*, div){margin: 0;}:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}:where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;}.has-black-color{color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-color{color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-color{color: var(--wp--preset--color--white) !important;}.has-pale-pink-color{color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-color{color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-color{color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-color{color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-color{color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-color{color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-color{color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-color{color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-color{color: var(--wp--preset--color--vivid-purple) !important;}.has-black-background-color{background-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-background-color{background-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-background-color{background-color: var(--wp--preset--color--white) !important;}.has-pale-pink-background-color{background-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-background-color{background-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-background-color{background-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-background-color{background-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-background-color{background-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-background-color{background-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-background-color{background-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-background-color{background-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-background-color{background-color: var(--wp--preset--color--vivid-purple) !important;}.has-black-border-color{border-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-border-color{border-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-border-color{border-color: var(--wp--preset--color--white) !important;}.has-pale-pink-border-color{border-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-border-color{border-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-border-color{border-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-border-color{border-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-border-color{border-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-border-color{border-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-border-color{border-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-border-color{border-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-border-color{border-color: var(--wp--preset--color--vivid-purple) !important;}.has-vivid-cyan-blue-to-vivid-purple-gradient-background{background: var(--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple) !important;}.has-light-green-cyan-to-vivid-green-cyan-gradient-background{background: var(--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan) !important;}.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange) !important;}.has-luminous-vivid-orange-to-vivid-red-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-orange-to-vivid-red) !important;}.has-very-light-gray-to-cyan-bluish-gray-gradient-background{background: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray) !important;}.has-cool-to-warm-spectrum-gradient-background{background: var(--wp--preset--gradient--cool-to-warm-spectrum) !important;}.has-blush-light-purple-gradient-background{background: var(--wp--preset--gradient--blush-light-purple) !important;}.has-blush-bordeaux-gradient-background{background: var(--wp--preset--gradient--blush-bordeaux) !important;}.has-luminous-dusk-gradient-background{background: var(--wp--preset--gradient--luminous-dusk) !important;}.has-pale-ocean-gradient-background{background: var(--wp--preset--gradient--pale-ocean) !important;}.has-electric-grass-gradient-background{background: var(--wp--preset--gradient--electric-grass) !important;}.has-midnight-gradient-background{background: var(--wp--preset--gradient--midnight) !important;}.has-small-font-size{font-size: var(--wp--preset--font-size--small) !important;}.has-medium-font-size{font-size: var(--wp--preset--font-size--medium) !important;}.has-large-font-size{font-size: var(--wp--preset--font-size--large) !important;}.has-x-large-font-size{font-size: var(--wp--preset--font-size--x-large) !important;} :where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;} :where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;} :root :where(.wp-block-pullquote){font-size: 1.5em;line-height: 1.6;} </style> <link rel='stylesheet' id='uptimerobot-styles-css' href='https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/dist/style.css?ver=1716828113' media='all' /> <link rel='stylesheet' id='child-theme-style-css' href='https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/style.css?ver=1.0' media='all' /> <link rel='stylesheet' id='generate-style-css' href='https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress/assets/css/main.min.css?ver=3.4.0' media='all' /> <style id='generate-style-inline-css'> body{background-color:var(--base-2);color:var(--contrast);}a{color:#3bd671;}a{text-decoration:underline;}.entry-title a, .site-branding a, a.button, .wp-block-button__link, .main-navigation a{text-decoration:none;}a:hover, a:focus, a:active{color:#4faa6c;}.grid-container{max-width:2000px;}.wp-block-group__inner-container{max-width:2000px;margin-left:auto;margin-right:auto;}.generate-back-to-top{font-size:20px;border-radius:3px;position:fixed;bottom:30px;right:30px;line-height:40px;width:40px;text-align:center;z-index:10;transition:opacity 300ms ease-in-out;opacity:0.1;transform:translateY(1000px);}.generate-back-to-top__show{opacity:1;transform:translateY(0);}.dropdown-click .main-navigation ul ul{display:none;visibility:hidden;}.dropdown-click .main-navigation ul ul ul.toggled-on{left:0;top:auto;position:relative;box-shadow:none;border-bottom:1px solid rgba(0,0,0,0.05);}.dropdown-click .main-navigation ul ul li:last-child > ul.toggled-on{border-bottom:0;}.dropdown-click .main-navigation ul.toggled-on, .dropdown-click .main-navigation ul li.sfHover > ul.toggled-on{display:block;left:auto;right:auto;opacity:1;visibility:visible;pointer-events:auto;height:auto;overflow:visible;float:none;}.dropdown-click .main-navigation.sub-menu-left .sub-menu.toggled-on, .dropdown-click .main-navigation.sub-menu-left ul li.sfHover > ul.toggled-on{right:0;}.dropdown-click nav ul ul ul{background-color:transparent;}.dropdown-click .widget-area .main-navigation ul ul{top:auto;position:absolute;float:none;width:100%;left:-99999px;}.dropdown-click .widget-area .main-navigation ul ul.toggled-on{position:relative;left:0;right:0;}.dropdown-click .widget-area.sidebar .main-navigation ul li.sfHover ul, .dropdown-click .widget-area.sidebar .main-navigation ul li:hover ul{right:0;left:0;}.dropdown-click .sfHover > a > .dropdown-menu-toggle > .gp-icon svg{transform:rotate(180deg);}:root{--contrast:#222222;--contrast-2:rgba(88,88,97,0);--contrast-3:rgba(180,180,191,0);--base:rgba(240,240,240,0);--base-2:rgba(247,249,250,0);--base-3:#ffffff;--accent:#1e73be;}:root .has-contrast-color{color:var(--contrast);}:root .has-contrast-background-color{background-color:var(--contrast);}:root .has-contrast-2-color{color:var(--contrast-2);}:root .has-contrast-2-background-color{background-color:var(--contrast-2);}:root .has-contrast-3-color{color:var(--contrast-3);}:root .has-contrast-3-background-color{background-color:var(--contrast-3);}:root .has-base-color{color:var(--base);}:root .has-base-background-color{background-color:var(--base);}:root .has-base-2-color{color:var(--base-2);}:root .has-base-2-background-color{background-color:var(--base-2);}:root .has-base-3-color{color:var(--base-3);}:root .has-base-3-background-color{background-color:var(--base-3);}:root .has-accent-color{color:var(--accent);}:root .has-accent-background-color{background-color:var(--accent);}body, button, input, select, textarea{font-family:Roboto, sans-serif;font-weight:400;font-style:normal;}.top-bar{background-color:#636363;color:#ffffff;}.top-bar a{color:#ffffff;}.top-bar a:hover{color:#303030;}.site-header{background-color:#121B26;}.main-title a,.main-title a:hover{color:#3BD671;}.site-description{color:var(--contrast-2);}.main-navigation,.main-navigation ul ul{background-color:var(--base-3);}.main-navigation .main-nav ul li a, .main-navigation .menu-toggle, .main-navigation .menu-bar-items{color:var(--contrast);}.main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a, .main-navigation .main-nav ul li:not([class*="current-menu-"]):focus > a, .main-navigation .main-nav ul li.sfHover:not([class*="current-menu-"]) > a, .main-navigation .menu-bar-item:hover > a, .main-navigation .menu-bar-item.sfHover > a{color:var(--accent);}button.menu-toggle:hover,button.menu-toggle:focus{color:var(--contrast);}.main-navigation .main-nav ul li[class*="current-menu-"] > a{color:var(--accent);}.navigation-search input[type="search"],.navigation-search input[type="search"]:active, .navigation-search input[type="search"]:focus, .main-navigation .main-nav ul li.search-item.active > a, .main-navigation .menu-bar-items .search-item.active > a{color:var(--accent);}.main-navigation ul ul{background-color:var(--base);}.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .one-container .container, .separate-containers .paging-navigation, .inside-page-header{background-color:var(--base-3);}.entry-title a{color:var(--contrast);}.entry-title a:hover{color:var(--contrast-2);}.entry-meta{color:var(--contrast-2);}.sidebar .widget{background-color:var(--base-3);}.footer-widgets{background-color:var(--base-3);}.site-info{background-color:var(--base-3);}input[type="text"],input[type="email"],input[type="url"],input[type="password"],input[type="search"],input[type="tel"],input[type="number"],textarea,select{color:var(--contrast);background-color:var(--base-2);border-color:var(--base);}input[type="text"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="password"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="number"]:focus,textarea:focus,select:focus{color:var(--contrast);background-color:var(--base-2);border-color:var(--contrast-3);}button,html input[type="button"],input[type="reset"],input[type="submit"],a.button,a.wp-block-button__link:not(.has-background){color:#ffffff;background-color:#3BD671;}button:hover,html input[type="button"]:hover,input[type="reset"]:hover,input[type="submit"]:hover,a.button:hover,button:focus,html input[type="button"]:focus,input[type="reset"]:focus,input[type="submit"]:focus,a.button:focus,a.wp-block-button__link:not(.has-background):active,a.wp-block-button__link:not(.has-background):focus,a.wp-block-button__link:not(.has-background):hover{color:#ffffff;background-color:#5ebb7c;}a.generate-back-to-top{background-color:rgba( 0,0,0,0.4 );color:#ffffff;}a.generate-back-to-top:hover,a.generate-back-to-top:focus{background-color:rgba( 0,0,0,0.6 );color:#ffffff;}:root{--gp-search-modal-bg-color:var(--base-3);--gp-search-modal-text-color:var(--contrast);--gp-search-modal-overlay-bg-color:rgba(0,0,0,0.2);}@media (max-width:768px){.main-navigation .menu-bar-item:hover > a, .main-navigation .menu-bar-item.sfHover > a{background:none;color:var(--contrast);}}.nav-below-header .main-navigation .inside-navigation.grid-container, .nav-above-header .main-navigation .inside-navigation.grid-container{padding:0px 20px 0px 20px;}.site-main .wp-block-group__inner-container{padding:40px;}.separate-containers .paging-navigation{padding-top:20px;padding-bottom:20px;}.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull{margin-left:-40px;width:calc(100% + 80px);max-width:calc(100% + 80px);}.rtl .menu-item-has-children .dropdown-menu-toggle{padding-left:20px;}.rtl .main-navigation .main-nav ul li.menu-item-has-children > a{padding-right:20px;}@media (max-width:768px){.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .separate-containers .paging-navigation, .one-container .site-content, .inside-page-header{padding:30px;}.site-main .wp-block-group__inner-container{padding:30px;}.inside-top-bar{padding-right:30px;padding-left:30px;}.inside-header{padding-right:30px;padding-left:30px;}.widget-area .widget{padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px;}.footer-widgets-container{padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px;}.inside-site-info{padding-right:30px;padding-left:30px;}.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull{margin-left:-30px;width:calc(100% + 60px);max-width:calc(100% + 60px);}.one-container .site-main .paging-navigation{margin-bottom:20px;}}/* End cached CSS */.is-right-sidebar{width:25%;}.is-left-sidebar{width:25%;}.site-content .content-area{width:50%;}@media (max-width:768px){.main-navigation .menu-toggle,.sidebar-nav-mobile:not(#sticky-placeholder){display:block;}.main-navigation ul,.gen-sidebar-nav,.main-navigation:not(.slideout-navigation):not(.toggled) .main-nav > ul,.has-inline-mobile-toggle #site-navigation .inside-navigation > *:not(.navigation-search):not(.main-nav){display:none;}.nav-align-right .inside-navigation,.nav-align-center .inside-navigation{justify-content:space-between;}.has-inline-mobile-toggle .mobile-menu-control-wrapper{display:flex;flex-wrap:wrap;}.has-inline-mobile-toggle .inside-header{flex-direction:row;text-align:left;flex-wrap:wrap;}.has-inline-mobile-toggle .header-widget,.has-inline-mobile-toggle #site-navigation{flex-basis:100%;}.nav-float-left .has-inline-mobile-toggle #site-navigation{order:10;}} </style> <link rel='stylesheet' id='generate-child-css' href='https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/style.css?ver=1723799495' media='all' /> <link rel='stylesheet' id='generate-google-fonts-css' href='https://fonts.googleapis.com/css?family=Roboto%3A100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C500%2C500italic%2C700%2C700italic%2C900%2C900italic&display=swap&ver=3.4.0' media='all' /> <link rel='stylesheet' id='hcb-style-css' href='https://uptimerobot.com/knowledge-hub/wp-content/plugins/highlighting-code-block/build/css/hcb--dark.css?ver=2.0.1' media='all' /> <style id='hcb-style-inline-css'> :root{--hcb--fz--base: 14px}:root{--hcb--fz--mobile: 13px}:root{--hcb--ff:Roboto, Consolas, sans-serif;}.hcb_wrap{--hcb--data-label: none;--hcb--btn-offset: 0px;} </style> <link rel='stylesheet' media='print' onload="this.media='all'" id='wp-block-library-css' href='https://uptimerobot.com/knowledge-hub/wp-includes/css/dist/block-library/style.min.css?ver=a25461114d996c2352e4eac39db659a7' media='all' /> <script src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/dist/main.js?ver=1712940427" id="uptimerobot-scripts-js"></script> <script src="https://uptimerobot.com/knowledge-hub/wp-includes/js/jquery/jquery.min.js?ver=3.7.1" id="jquery-core-js"></script> <script src="https://uptimerobot.com/knowledge-hub/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.1" id="jquery-migrate-js"></script> <link rel="https://api.w.org/" href="https://uptimerobot.com/knowledge-hub/wp-json/" /><link rel="alternate" title="JSON" type="application/json" href="https://uptimerobot.com/knowledge-hub/wp-json/wp/v2/posts/97" /><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://uptimerobot.com/knowledge-hub/xmlrpc.php?rsd" /> <link rel='shortlink' href='https://uptimerobot.com/knowledge-hub/?p=97' /> <link rel="alternate" title="oEmbed (JSON)" type="application/json+oembed" href="https://uptimerobot.com/knowledge-hub/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fuptimerobot.com%2Fknowledge-hub%2Fcron-monitoring%2Fcron-job-guide%2F" /> <link rel="alternate" title="oEmbed (XML)" type="text/xml+oembed" href="https://uptimerobot.com/knowledge-hub/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fuptimerobot.com%2Fknowledge-hub%2Fcron-monitoring%2Fcron-job-guide%2F&format=xml" /> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://users.uptimerobot.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-TMWSCG3');</script> <!-- End Google Tag Manager --> <style> .ppw-ppf-input-container { background-color: !important; padding: px!important; border-radius: px!important; } .ppw-ppf-input-container div.ppw-ppf-headline { font-size: px!important; font-weight: !important; color: !important; } .ppw-ppf-input-container div.ppw-ppf-desc { font-size: px!important; font-weight: !important; color: !important; } .ppw-ppf-input-container label.ppw-pwd-label { font-size: px!important; font-weight: !important; color: !important; } div.ppwp-wrong-pw-error { font-size: px!important; font-weight: !important; color: #dc3232!important; background: !important; } .ppw-ppf-input-container input[type='submit'] { color: !important; background: !important; } .ppw-ppf-input-container input[type='submit']:hover { color: !important; background: !important; } .ppw-ppf-desc-below { font-size: px!important; font-weight: !important; color: !important; } </style> <style> .ppw-form { background-color: !important; padding: px!important; border-radius: px!important; } .ppw-headline.ppw-pcp-pf-headline { font-size: px!important; font-weight: !important; color: !important; } .ppw-description.ppw-pcp-pf-desc { font-size: px!important; font-weight: !important; color: !important; } .ppw-pcp-pf-desc-above-btn { display: block; } .ppw-pcp-pf-desc-below-form { font-size: px!important; font-weight: !important; color: !important; } .ppw-input label.ppw-pcp-password-label { font-size: px!important; font-weight: !important; color: !important; } .ppw-form input[type='submit'] { color: !important; background: !important; } .ppw-form input[type='submit']:hover { color: !important; background: !important; } div.ppw-error.ppw-pcp-pf-error-msg { font-size: px!important; font-weight: !important; color: #dc3232!important; background: !important; } </style> <script type="application/ld+json">{"@context":"https://schema.org/","@type":"Article,Thing","author":[{"@type":"Person","name":"Laura Clayton","url":"https://uptimerobot.com/knowledge-hub/author/laura/"}],"headline":"Our complete cron job guide for 2024","datePublished":"2024-07-24T09:27:08+00:00","publisher":{"@type":"Organization","name":"Uptime Robot","logo":{"@type":"ImageObject","url":"http://localhost:10016/wp-content/uploads/2024/02/knowledgehub.png"}},"dateModified":"2024-07-24T09:27:09+00:00","mainEntityOfPage":"https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/","description":"When it comes to system administration, the need for automation and precise scheduling has never been greater. That\u2019s where cron comes in, the time-based job scheduler that has been a steadfast companion of Unix-like operating systems for decades. If you’re a seasoned sysadmin or just a curious enthusiast, understanding the ins and outs of Cron ... <a title=\"Our complete cron job guide for 2024\" class=\"read-more\" href=\"https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/\" aria-label=\"Read more about Our complete cron job guide for 2024\">Read more</a>","inLanguage":"en-US","sameAs":[],"url":"https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/","name":"Our complete cron job guide for 2024","articleSection":["Cron Monitoring"],"wordCount":2778,"image":"","reviewedBy":{"@type":"Person","name":"Alex Ioannides"}}</script><link rel="pingback" href="https://uptimerobot.com/knowledge-hub/xmlrpc.php"> </head> <body class="post-template-default single single-post postid-97 single-format-standard wp-custom-logo wp-embed-responsive both-sidebars nav-float-right one-container header-aligned-left dropdown-click-arrow dropdown-click" itemtype="https://schema.org/Blog" itemscope> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://users.uptimerobot.com/ns.html?id=GTM-TMWSCG3" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --><a class="screen-reader-text skip-link" href="#content" title="Skip to content">Skip to content</a> <div class="ur-prefix"> <header class="ur-header uk-position-fixed uk-flex uk-flex-middle uk-width-1-1 is-scrolled" role="banner"> <div class="uk-container uk-container-center"> <nav class="boundary-align uk-panel uk-flex uk-flex-middle uk-flex-between"> <div class="page-menu uk-flex uk-flex-middle"> <div class="uk-position-relative"> <a title="UptimeRobot Homepage" href="/"> <img alt="UptimeRobot logo" class="page-logo" src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/images/uptimerobot-logo.svg" width="210" height="23" /> </a> <a class="uk-label uk-label-warning" id="hiring-badge" href="https://itrinitycom.notion.site/Careers-work-with-us-d3796aa492764653af60f7028a87b206" target="_blank" rel="noopener nofollow"> We are hiring! </a> </div> <ul class="nav uk-visible@l"> <li> <a href="#"> Monitoring <i class="fas fa-chevron-down" style="font-size: 10px; position: relative; top: -1px; margin-left: 4px;"></i> </a> <div uk-dropdown="pos: bottom-justify; boundary: .boundary-align; boundary-align: true; animation: uk-animation-slide-top-small; duration: 200; offset: 25;" class="uk-background-default uk-padding-remove uk-width-1-1 uk-border-circle uk-position-absolute" > <div uk-grid class="uk-flex uk-flex-top uk-drop-grid uk-flex-left uk-child-width-1-4@m uk-margin-remove card monitoring-submenu"> <div class="uk-padding-small"> <strong class="font-24">Reliable uptime<br />monitoring<span class="uk-text-primary">.</span></strong> </div> <a href="https://uptimerobot.com/website-monitoring/" target="_blank" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"> <div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"> <img alt="website monitoring icon" src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/images/monitor-icons/website-monitoring.svg" width="50px" uk-img /> </div> <div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"> <span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Website monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Be the first to know that your website is down!</span> </div> </a> <a href="https://uptimerobot.com/cron-job-monitoring/" target="_blank" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"> <div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"> <img alt="cron job monitoring icon" src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/images/monitor-icons/cron-job-monitoring.svg" width="50px" uk-img /> </div> <div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"> <span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Cron job monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Monitor background jobs or intranet devices.</span> </div> </a> <a href="https://uptimerobot.com/port-monitoring/" target="_blank" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"> <div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"> <img alt="port monitoring icon" src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/images/monitor-icons/port-monitoring.svg" width="50px" uk-img /> </div> <div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"> <span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Port monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Monitor IMAP, POP3 or any other specific ports.</span> </div> </a> <a href="https://uptimerobot.com/keyword-monitoring/" target="_blank" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"> <div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"> <img alt="keyword monitoring icon" src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/images/monitor-icons/keyword-monitoring.svg" width="50px" uk-img /> </div> <div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"> <span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Keyword monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Check presence of any text on the page.</span> </div> </a> <a href="https://uptimerobot.com/ping-monitoring/" target="_blank" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"> <div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"> <img alt="ping monitoring icon" src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/images/monitor-icons/ping-monitoring.svg" width="50px" uk-img /> </div> <div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"> <span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Ping monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Leverage one of the most used network admin tools.</span> </div> </a> <a href="https://uptimerobot.com/ssl-monitoring/" target="_blank" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"> <div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"> <img alt="ssl certificate monitoring icon" src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/images/monitor-icons/ssl-monitoring.svg" width="50px" uk-img /> </div> <div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"> <span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">SSL monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Don't lose visitors because of expired SSL certificates.</span> </div> </a> <a href="https://uptimerobot.com/domain-expiration-monitoring/" target="_blank" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"> <div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"> <img alt="domain expiration monitoring icon" src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/images/monitor-icons/domain-monitoring.svg" width="50px" uk-img /> </div> <div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"> <span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Domain monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Don't let your unique domain name expire.</span> </div> </a> </div> <div> </li> <li> <a href="https://uptimerobot.com/integrations/" target="_blank"> Integrations </a> </li> <li> <a href="https://uptimerobot.com/status-page/" target="_blank"> Status Page </a> </li> <li> <a href="https://uptimerobot.com/pricing/" target="_blank"> Pricing <!--<span class="uk-label uk-label-warning bf-show uk-hidden">- 30%</span>--> </a> </li> </ul> </div> <button aria-label="Open menu" type="button" class="btn-icon uk-hidden@l uk-margin-small-left" uk-toggle="target: #mobile-menu" type="button" > <i class="fas fa-bars"></i> </button> </div> </nav> </header> <aside id="mobile-menu" uk-offcanvas="overlay: true" class="mobile-menu-wrap kokotina"> <div class="uk-flex uk-flex-column uk-padding-remove uk-offcanvas-bar uk-width-1-1 mobile-menu"> <div class="uk-flex uk-flex-between uk-flex-middle uk-padding"> <a class="" title="UptimeRobot Homepage" href="/"> <img alt="UptimeRobot logo" class="page-logo" src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/images/uptimerobot-logo.svg" width="210" height="23" /> </a> <button class="btn-icon uk-offcanvas-close" type="button" uk-close ><i class="fas fa-x"></i></button> </div> <div class="uk-flex uk-flex-column uk-child-width-1@m uk-padding mobile-menu-section"> <span class="font-18 uk-text-bold">Monitors</span> <div class="uk-flex uk-flex-middle uk-padding-remove uk-margin-remove uk-flex-between uk-width-1-1 uk-child-width-1@m uk-grid monitoring-submenu-mobile"> <a href="https://uptimerobot.com/website-monitoring/" target="_blank" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"> <div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"> <img alt="website monitoring icon" src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/images/monitor-icons/dark/website-monitoring.svg" width="50px" uk-img /> </div> <div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"> <span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Website monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Be the first to know that your website is down!</span> </div> </a> <a href="https://uptimerobot.com/cron-job-monitoring/" target="_blank" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"> <div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"> <img alt="cron job monitoring icon" src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/images/monitor-icons/dark/cron-job-monitoring.svg" width="50px" uk-img /> </div> <div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"> <span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Cron job monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Monitor background jobs or intranet devices.</span> </div> </a> <a href="https://uptimerobot.com/port-monitoring/" target="_blank" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"> <div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"> <img alt="port monitoring icon" src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/images/monitor-icons/dark/port-monitoring.svg" width="50px" uk-img /> </div> <div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"> <span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Port monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Monitor IMAP, POP3 or any other specific ports.</span> </div> </a> <a href="https://uptimerobot.com/keyword-monitoring/" target="_blank" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"> <div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"> <img alt="keyword monitoring icon" src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/images/monitor-icons/dark/keyword-monitoring.svg" width="50px" uk-img /> </div> <div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"> <span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Keyword monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Check presence of any text on the page.</span> </div> </a> <a href="https://uptimerobot.com/ping-monitoring/" target="_blank" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"> <div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"> <img alt="ping monitoring icon" src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/images/monitor-icons/dark/ping-monitoring.svg" width="50px" uk-img /> </div> <div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"> <span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Ping monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Leverage one of the most used network admin tools.</span> </div> </a> <a href="https://uptimerobot.com/ssl-monitoring/" target="_blank" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"> <div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"> <img alt="ssl certificate monitoring icon" src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/images/monitor-icons/dark/ssl-monitoring.svg" width="50px" uk-img /> </div> <div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"> <span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">SSL monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Don't lose visitors because of expired SSL certificates.</span> </div> </a> <a href="https://uptimerobot.com/domain-expiration-monitoring/" target="_blank" class="uk-flex uk-flex-top uk-padding-small monitor uk-margin-remove"> <div class="uk-flex uk-flex-middle uk-flex-left monitor-icon"> <img alt="domain expiration monitoring icon" src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/images/monitor-icons/dark/domain-monitoring.svg" width="50px" uk-img /> </div> <div class="uk-flex uk-flex-top uk-flex-column uk-margin-small-left text"> <span class="font-18 uk-text-secondary uk-text-bold uk-margin-remove">Domain monitoring</span> <span class="font-16 uk-text-muted uk-margin-remove">Don't let your unique domain name expire.</span> </div> </a> </div> </div> <ul class="uk-flex uk-flex-column uk-padding mobile-menu-list font-18 uk-text-bold mobile-menu-section"> <li> <a href="https://uptimerobot.com/integrations/" target="_blank" class="uk-padding-small uk-display-block uk-padding-remove-horizontal {{#if pricing_page}}active-menu{{/if}}"> Integrations </a> </li> <li> <a href="https://uptimerobot.com/status-page/" target="_blank" class="uk-padding-small uk-display-block uk-padding-remove-horizontal {{#if pricing_page}}active-menu{{/if}}"> Status Page </a> </li> <li> <a href="https://uptimerobot.com/pricing/" target="_blank" class="uk-padding-small uk-display-block uk-padding-remove-horizontal {{#if pricing_page}}active-menu{{/if}}"> Pricing </a> </li> <!-- <li class="hide-for-logged"> <a href="/login?ref=website-mobile-menu" class="uk-padding-small uk-display-block uk-padding-remove-horizontal"> Log In </a> </li> <li class="show-for-logged uk-hidden"> <a href="https://uptimerobot.com/dashboard?ref=website-mobile-menu#mainDashboard" class="uk-padding-small uk-display-block uk-padding-remove-horizontal"> Go to Dashboard </a> </li> --> </ul> <!-- <div class="uk-flex uk-padding mobile-menu-section"> <a class="uk-button uk-margin-auto uk-button-primary uk-button-large uk-width-auto hide-for-logged" href="/signUp?ref=website-mobile-menu"> Register for FREE </a> </div> --> </div> </aside> </div> <div class="kw-header"><p id="breadcrumbs"><span><span><a href="https://uptimerobot.com/knowledge-hub/">Knowledge Hub</a></span> » <span><a href="https://uptimerobot.com/knowledge-hub/cron-monitoring/">Cron Monitoring</a></span> » <span class="breadcrumb_last" aria-current="page">Our complete cron job guide for 2024</span></span></p><h1>Our complete cron job guide for 2024</h1><p>Content verified by <a href="https://uptimerobot.com/blog/author/alex/">Alex Ioannides</a></p><p>Last updated on: July 24, 2024</p></div> <div class="site grid-container container hfeed" id="page"> <div class="site-content" id="content"> <div class="content-area" id="primary"> <main class="site-main" id="main"> <article id="post-97" class="post-97 post type-post status-publish format-standard hentry category-cron-monitoring"> <div class="inside-article"> <div class="entry-content" itemprop="text"> <p>When it comes to system administration, the need for automation and precise scheduling has never been greater.</p> <p>That’s where cron comes in, the time-based job scheduler that has been a steadfast companion of Unix-like operating systems for decades. If you’re a seasoned sysadmin or just a curious enthusiast, understanding the ins and outs of Cron is a valuable skill.</p> <p>In this Cron job guide, we will take you on a journey through the world of Cron, exploring its fundamentals, pros and cons, practical examples, and things you should know. </p> <p>Whether you’re looking to automate system maintenance, schedule routine tasks, or optimize resource usage, this guide will equip you with the knowledge you need to <strong>harness the power of cron</strong> effectively.</p> <h2 class="wp-block-heading">What is cron?</h2> <p>Cron, short for “chronograph,” is designed to <strong>enable the automated execution of tasks</strong> – be they commands or scripts – at <strong>precisely defined times, dates, or intervals</strong> within Unix-like operating systems (including Linux and macOS).</p> <p>While its primary use revolves around<strong> automating system maintenance and administrative tasks</strong>, the scope of Cron extends to encompass a wide spectrum of applications and use cases.</p> <p>At the heart of this remarkable scheduling mechanism lies a daemon known as ‘crond.’ This daemon operates stealthily in the background, continuously monitoring the contents of ‘crontab’ files, often referred to as ‘cron tables.’</p> <p>These tables serve as repositories for meticulously outlined commands, awaiting their turn for execution at predetermined moments in time.</p> <p>With the oversight of ‘crond,’ Cron ensures that these tasks transpire with unfailing accuracy, aligning with the specified schedules down to the exact minute.</p> <p>In essence, Cron empowers users to choreograph a symphony of automated actions, orchestrating everything from routine system upkeep to intricate workflows with extreme precision.</p> <h3 class="wp-block-heading">Pros and cons of using cron jobs</h3> <p>After that description, why wouldn’t you want to use Cron jobs for everything? Well, like with most things in life, there are benefits and drawbacks.</p> <h4 class="wp-block-heading">✅ Pros</h4> <ul class="wp-block-list"> <li><strong>Automation:</strong> Cron automates the running of scripts or commands, making routine tasks hands-off and reliable.</li> <li><strong>Flexibility: </strong>You can schedule almost anything with cron, from simple scripts to complex programs.</li> <li><strong>Precision:</strong> Schedule tasks down to the minute, ensuring that tasks are carried out exactly when needed.</li> <li><strong>Simplicity:</strong> Cron syntax is straightforward <em>once you understand it</em>, making it relatively easy to schedule tasks.</li> <li><strong>Resource management:</strong> You can optimize resource usage by scheduling tasks during off-peak hours.</li> </ul> <h4 class="wp-block-heading">❌ Cons</h4> <ul class="wp-block-list"> <li><strong>Complexity for advanced schedules: </strong>While basic scheduling is straightforward, more complex timing can be tricky to get right for new users.</li> <li><strong>No execution guarantee:</strong> If a system is down or cron service is not running, tasks won’t execute. There’s also no built-in mechanism to rerun missed jobs.</li> <li><strong>Limited to time-based scheduling: </strong>Cron is excellent for time-based jobs, but doesn’t handle event-based triggers natively.</li> <li><strong>Debugging difficulty:</strong> If a cron job fails, it might not be apparent why. The syslog service usually captures the output, but this can be overlooked.</li> <li><strong>Security concerns:</strong> Incorrectly configured cron jobs can pose security risks, especially if they have permissions to execute powerful commands.</li> </ul> <p>Understanding these pros and cons can help you decide if cron is the right tool for your scheduling needs and how to best implement it if so.</p> <h2 class="wp-block-heading">What is a Cron job?</h2> <p>A Cron job is a <strong>pre-scheduled task</strong> that the Cron system automates at specified intervals.</p> <p>These tasks commonly involve executing shell scripts or commands for activities like routine system maintenance, data backups, file cleanup, and more.</p> <p>The term ‘cron job’ derives its name from the Greek word ‘Chronos’, which translates to time, aptly capturing the essence of a utility designed for timed tasks.</p> <h4 class="wp-block-heading">Defining cron jobs</h4> <p>To define cron jobs, users employ a “crontab” (short for cron table) file, where they list the tasks and specify when these tasks should be executed.</p> <p>Cron jobs can be scheduled to run minutely, hourly, daily, monthly, or even on specific days of the week.</p> <p>This flexibility allows users to automate tasks during off-peak hours, reducing the strain on system resources during peak times.</p> <h2 class="wp-block-heading">How do cron jobs work?</h2> <p>To understand how cron jobs function, let’s break down the process into a step-by-step guide:</p> <h3 class="wp-block-heading">Step 1: The cron daemon</h3> <p>At the heart of the cron system is the ‘cron daemon’. This background service operates continuously, running silently in the background of your Unix-like system.</p> <p>The cron daemon <strong>awakens every minute</strong>, like an overly anxious timekeeper. Its primary role is to check the crontab files for any scheduled tasks that are due to run at the current time.</p> <h3 class="wp-block-heading">Step 2: Creating and managing cron jobs</h3> <p>To create, modify, or remove cron jobs, users interact with the system using the ‘crontab’ command.</p> <p>Running “crontab -e” opens the user’s crontab file in their default text editor. Within this file, users can define the tasks they want to automate.</p> <p>Each line in the crontab file represents an individual job. It consists of two main components:</p> <ul class="wp-block-list"> <li><strong>Cron expression:</strong> A series of five-time fields that dictate when the task should run. These fields specify the minute, hour, day of the month, month, and day of the week.</li> <li><strong>Command to execute:</strong> After the cron expression, users specify the command or script to be executed. This is the task that Cron will carry out at the scheduled times.</li> </ul> <h3 class="wp-block-heading">Example of a simple cron job</h3> <p>To illustrate this process, here’s an example of a straightforward Cron job:</p> <p>0 * * * * /path/to/script.sh</p> <ul class="wp-block-list"> <li><strong>Cron expression:</strong> The “0 * * * ” represents the cron expression. In this case, it means the job runs when the minute is 0 (the start of the hour), and the rest of the fields indicate that it applies to every hour, every day, every month, and every day of the week.</li> <li><strong>Command to execute:</strong> After the cron expression, “/path/to/script.sh” specifies the path to the script that will be executed. This Cron job triggers the “script.sh” file precisely at the beginning of each hour, as the minute field is set to 0.</li> </ul> <p>In summary, cron jobs operate under the watch of the cron daemon, which checks the crontab files minute by minute. Users interact with the system to define tasks in their crontab files, specifying when and what should be executed.</p> <h3 class="wp-block-heading">How to create and manage cron jobs</h3> <p>Managing Cron jobs efficiently involves understanding how to interact with the Cron service and the crontab file. Here’s a guide on creating, editing, and managing Cron jobs effectively:</p> <h4 class="wp-block-heading">Creating and editing cron jobs</h4> <p>To create or edit cron jobs, you’ll use the crontab command.</p> <ul class="wp-block-list"> <li><strong>Create or edit:</strong> Open your crontab file by running “crontab -e” in your terminal. This action will open the crontab file in your default text editor. However, if it’s your first time opening cron, you’ll be prompted to select your preferred text editor.</li> <li><strong>Add jobs:</strong> In the editor, add or modify your tasks. Each line in the crontab file represents a separate job and consists of a cron expression followed by the specific command to be executed.</li> </ul> <h4 class="wp-block-heading">Starting, restarting, and stopping cron services</h4> <p>To make sure your Cron jobs run smoothly, you might need to start, restart, or stop the Cron service.</p> <ul class="wp-block-list"> <li><strong>Start Cron service:</strong> Run “sudo systemctl start cron” to initiate the cron service.</li> <li><strong>Restart Cron service:</strong> Execute “sudo systemctl restart cron” to restart the cron service.</li> <li><strong>Stop Cron service:</strong> Use “sudo systemctl stop cron” to halt the cron service, which may be necessary for maintenance or troubleshooting.</li> </ul> <h4 class="wp-block-heading">Setting up specific intervals</h4> <p>Cron allows for a wide range of time intervals. Here are a couple of common examples:</p> <ul class="wp-block-list"> <li><strong>Every 5 minutes:</strong> */5 * * * * /path/to/task.sh</li> <li><strong>Daily execution at midnight:</strong> 0 0 * * * /path/to/daily_task.sh</li> <li><strong>Every 30 Minutes: </strong>*/30 * * * * /path/to/half_hourly_task.sh</li> <li><strong>Weekly on Sundays at midnight:</strong> 0 0 * * 0 /path/to/weekly_sunday_task.sh</li> <li><strong>On the 15th monthly:</strong> 0 0 15 * * /path/to/monthly_task.sh</li> <li><strong>Every weekday at 9 AM:</strong> 0 9 * * 1-5 /path/to/weekday_task.sh</li> </ul> <p>These examples showcase the versatility of cron in scheduling tasks at specific intervals, whether it’s minutes, hours, days, or even specific weekdays and dates.</p> <h4 class="wp-block-heading">Managing crontab entries</h4> <p>Users can list their current Cron jobs with “<strong>crontab -l</strong>” and remove their crontab file using “<strong>crontab -r</strong>”. It’s crucial to manage these entries carefully to ensure that only necessary tasks are running, preventing wasted resources and potential conflicts.</p> <h3 class="wp-block-heading">Cron job syntax and examples</h3> <p>Cron job syntax is the <strong>pattern used to specify when cron should execute</strong> a task. The syntax consists of five fields, representing different time intervals, followed by the command to be executed.</p> <p>* * * * * /path/to/command</p> <p>| | | | | </p> <p>| | | | | </p> <p>| | | | +—– Day of the week (0 – 7) (Sunday=0 or 7)</p> <p>| | | +———- Month (1 – 12)</p> <p>| | +————— Day of the month (1 – 31)</p> <p>| +——————– Hour (0 – 23)</p> <p>+————————- Minute (0 – 59)</p> <p>Understanding the syntax of cron jobs is essential for accurately scheduling tasks. In addition to the basic structure, there are some advanced techniques and best practices worth noting:</p> <h4 class="wp-block-heading">Multiple time values</h4> <p>When configuring Cron jobs, you have the flexibility to <strong>specify multiple values for the time fields</strong> by using commas. This feature allows you to schedule a job to run at multiple, distinct times within a given time unit. For example:</p> <p><strong>0 8,12 * * * /path/to/script</strong></p> <p>The cron job is set to run at 8 AM and 12 PM. By using a comma to separate the values, you can create versatile schedules that align with your specific requirements. This capability is especially useful when you need a job to execute at various times during the day.</p> <h4 class="wp-block-heading">Ranges</h4> <p>To give yourself more scheduling flexibility, you can employ hyphens to <strong>specify a range of values</strong> within a time unit. This feature is quite helpful when you want a job to run multiple times within a consecutive range. For instance:</p> <p><strong>0 2-4 * * * /path/to/job</strong></p> <p>Here, the cron job is configured to execute at 2 AM, 3 AM, and 4 AM. Defining a range with a hyphen allows you to further streamline the scheduling process, ensuring that tasks occur at consecutive times.</p> <h4 class="wp-block-heading">Preventing output</h4> <p>In some cases, you may want to prevent cron jobs from generating logs for their standard output and standard error. To achieve this, you can redirect both output streams to <strong>/dev/null</strong>, which acts as a null device, essentially discarding any data sent to it. Here’s how you can do it:</p> <p><strong>0 2 * * * /path/to/job > /dev/null 2>&1</strong></p> <p>Now, any output or error messages produced by the cron job will be redirected to /dev/null. This effectively suppresses email notifications that might otherwise be sent to the user’s mailbox.</p> <h3 class="wp-block-heading">Cron job special strings</h3> <p>Cron jobs also support special strings that provide shorthand for common schedules:</p> <ul class="wp-block-list"> <li><strong>@hourly: </strong>Equivalent to 0 * * * *</li> <li><strong>@daily or @midnight:</strong> Equivalent to 0 0 * * *.</li> <li><strong>@weekly:</strong> Equivalent to 0 0 * * 0.</li> <li><strong>@monthly:</strong> Equivalent to 0 0 1 * *.</li> <li><strong>@yearly or @annually:</strong> Equivalent to 0 0 1 1 *.</li> <li><strong>@reboot:</strong> Run once at startup.</li> </ul> <h3 class="wp-block-heading">How to manage crontab entries</h3> <p>Now that you know the basic syntax and commands, here are the ways you can manage your crontab entries.</p> <ul class="wp-block-list"> <li><strong>List cron jobs:</strong> Use “crontab -l” to list all Cron jobs for the current user.</li> <li><strong>Edit cron jobs:</strong> Utilize “crontab -e” to edit the crontab file and add or modify jobs.</li> <li><strong>Delete cron jobs:</strong> Remove specific jobs by editing the crontab file, or use “crontab -r” to remove all jobs for the current user.</li> </ul> <p>Managing crontab entries involves not only creating and editing individual user crontabs, but also understanding system-wide crontabs and implementing best practices to safeguard your scheduled tasks.</p> <h3 class="wp-block-heading">Cron job errors and how to solve them</h3> <p>Cron jobs can sometimes encounter issues. Common problems include:</p> <ul class="wp-block-list"> <li><strong>Incorrect syntax:</strong> Make sure your cron syntax is accurate. Tools like <a href="https://crontab.guru/">crontab.guru</a> can help validate your cron expressions.</li> <li><strong>Permissions issues:</strong> Verify that the script or command has the necessary permissions to execute.</li> </ul> <p>Cron jobs are powerful tools for automation, but they can occasionally encounter errors or issues that need prompt attention. Read on to discover fixes to more specific problems.</p> <h4 class="wp-block-heading">Log analysis tools</h4> <p>One of the most valuable resources for troubleshooting cron job errors is the use of <strong>log analysis tools and techniques</strong>. Logs provide a detailed record of task execution, and reviewing them can help pinpoint the root causes of errors.</p> <ul class="wp-block-list"> <li><strong>System logs:</strong> Start by examining system logs, such as /var/log/syslog or /var/log/messages. These logs often contain valuable information about system-level events, including Cron job executions. Look for entries related to your specific cron jobs, paying attention to any error messages or unexpected behavior.</li> <li><strong>Cron-specific logs:</strong> Many Unix-like operating systems maintain dedicated cron logs, such as /var/log/cron or /var/log/cron.log. These logs specifically track cron job execution. Analyzing cron-specific logs can provide insights into job scheduling, execution times, and any encountered errors.</li> <li><strong>Custom log files: </strong>If your cron jobs generate custom log files as part of their execution, review these as well. Custom log files often contain task-specific information and can be instrumental in diagnosing errors unique to your tasks.</li> </ul> <p>When analyzing logs, <strong>pay attention</strong> to timestamps, error messages, and any patterns or recurring issues. Use text search and filtering tools to streamline your log analysis process.</p> <p>Log analysis helps identify errors and provides a historical perspective on task execution, facilitating troubleshooting and performance optimization.</p> <h2 class="wp-block-heading">Cron job monitoring guide</h2> <p><a href="https://uptimerobot.com/cron-job-monitoring/?utm_source=uptimerobot.com&utm_medium=blog&utm_campaign=cron-job-guide&utm_content=uptimerobot">Monitoring cron jobs</a> is essential to ensuring that scheduled tasks run smoothly and as intended.</p> <p>Keeping a watchful eye on your Cron job execution allows you to promptly detect any failures, errors, or delays, preventing potential issues from escalating.</p> <p>This proactive approach to monitoring not only helps maintain system performance and reliability, but also ensures that critical tasks, such as backups or maintenance routines, are executed on time.</p> <p>With monitoring in place, you can stay informed, receive alerts for any anomalies, and take immediate action to address problems, ultimately contributing to a more robust and dependable automated task management system.</p> <p><strong>TIP</strong>: Read our detailed guide about the <a href="https://uptimerobot.com/blog/best-cronjob-monitoring-tools/?utm_source=uptimerobot.com&utm_medium=blog&utm_campaign=cron-job-guide&utm_content=uptimerobot">9 best cron job monitoring tools</a>.</p> <h3 class="wp-block-heading">Step-by-step Cron job monitoring with UptimeRobot</h3> <p>UptimeRobot is a popular monitoring service that allows you to monitor the availability and performance of your websites and servers, including cron jobs and devices connected to the Internet.</p> <figure class="wp-block-image"><a href="https://uptimerobot.com/blog/wp-content/uploads/2024/01/Screenshot-2024-01-22-at-15.48.39.png"><img decoding="async" src="https://uptimerobot.com/blog/wp-content/uploads/2024/01/Screenshot-2024-01-22-at-15.48.39.png" alt="cron-job-monitoring-uptimerobot" class="wp-image-1684"/></a></figure> <p>Are you new to cron job monitoring? Here’s a step-by-step guide on how to set up cron job monitoring with UptimeRobot:</p> <ol class="wp-block-list"> <li><strong>Sign up or log in:</strong> If you don’t have an UptimeRobot account, sign up for one using just your email address.</li> <li><strong>Add a monitor:</strong> In your UptimeRobot dashboard, click on “Add New Monitor.</li> <li><strong>Select monitor type: </strong>Choose the “Cron job / Heartbeat monitoring” type.</li> <li><strong>Name it</strong>: Add whatever name you like to easily identify your cron job monitoring.</li> <li><strong>Set the intervals and timeout</strong>: E.g., set 1 minute if we should expect a request from you every minute. Set the timeout threshold or keep it at the default 30 seconds in case the requests arrive a bit later for whatever reason to avoid false positives.</li> <li><strong>Choose notification options</strong>: You can immediately choose how we’ll notify you, whether it be through E-mail, SMS, Voice call, Mobile push, or anything else from our list of <a href="https://uptimerobot.com/integrations/?utm_source=uptimerobot.com&utm_medium=blog&utm_campaign=cron-job-guide&utm_content=uptimerobot">up to 16 integrations</a>.</li> <li><strong>Click on “Create monitor”</strong></li> <li><strong>The URL for your new cron job monitoring will be generated</strong>: Use this URL to send your requests.</li> </ol> <p><strong>TIP</strong>: How to send HTTP requests to the cron job monitor? <a href="https://uptimerobot.com/help/heartbeat-monitoring/?utm_source=uptimerobot.com&utm_medium=blog&utm_campaign=cron-job-guide&utm_content=uptimerobot">Read our guides for Crontab (Unix/Linux) and Task Scheduler (Windows)</a>.</p> <ul class="wp-block-list"> <li> </li> </ul> <h2 class="wp-block-heading">Cron job examples</h2> <p>To help you get started with cron jobs and understand their practical applications, have a look at are some examples of common tasks you can automate:</p> <h4 class="wp-block-heading">Backing up a database daily at midnight</h4> <p>0 0 * * * /usr/bin/mysqldump -u root -pYourPassword database_name > /path/to/backup/database_name.sql</p> <p>This cron job runs a MySQL database backup every day at midnight.</p> <h4 class="wp-block-heading">Running a script every 5 minutes</h4> <p>*/5 * * * * /path/to/script.sh</p> <p>This configuration sets up your script to run every 5 minutes, ideal for frequent tasks like checking system health or syncing files.</p> <h4 class="wp-block-heading">Rebooting the server weekly</h4> <p>@weekly /sbin/shutdown -r now</p> <p>Using the “@weekly” special string, this cron job schedules a weekly server reboot, ensuring regular system freshness.</p> <h4 class="wp-block-heading">Sending a reminder email on the first day of every month</h4> <p>0 9 1 * * echo “Don’t forget to submit your report!” | mail -s “Monthly Report Reminder” user@example.com</p> <p>This job sends an email reminder on the first day of every month at 9 AM.</p> <h4 class="wp-block-heading">Cleaning temporary files every night</h4> <p>0 2 * * * /usr/bin/find /tmp -type f -mtime +1 -delete</p> <p>This cron job finds and deletes files in the /tmp directory that are older than one day, helping keep temporary space clean.</p> <h3 class="wp-block-heading">Conclusion</h3> <p>In the world of Unix-like operating systems, cron jobs serve as vital tools for automating tasks, increasing efficiency, and maintaining system health.</p> <p>Whether you’re a system administrator looking to streamline routine maintenance or an enthusiast seeking to automate personal projects, understanding cron jobs is a valuable skill.</p> <p>Are you a cron job fanatic now?</p> <p>Start monitoring your cron jobs with UptimeRobot and rest easy knowing you’ll be alerted the minute something seems off.</p> <div class="wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-1 wp-block-buttons-is-layout-flex"> <div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://uptimerobot.com/signUp?utm_source=uptimerobot.com&utm_medium=blog&utm_campaign=cron-job-guide&utm_content=uptimerobot">Start Monitoring in 30 Seconds</a></div> </div> <div class="author-box"> <div class="author-avatar"> <img src="https://uptimerobot.com/knowledge-hub/wp-content/uploads/2024/04/laura_clayton-150x150.jpeg" width="90" height="90" alt="Laura Clayton" class="avatar avatar-90 wp-user-avatar wp-user-avatar-90 alignnone photo" /> </div> <div class="author-info"> <p class="author-written-by">Written by</p> <div class="author-name-linkedin"> <h5 class="author-name">Laura Clayton</h5> <a href="https://www.linkedin.com/in/laura-clayton-b00a4aa4/" target="_blank" class="author-linkedin"> <i class="fab fa-linkedin"></i> </a> </div> <p class="author-bio">Laura Claytonhas over a decade of experience in the tech industry, she brings a wealth of knowledge and insights to her articles, helping businesses maintain optimal online performance. Laura's passion for technology drives her to explore the latest in monitoring tools and techniques, making her a trusted voice in the field.</p> </div> </div> </div> </div> </article> </main> </div> <div class="widget-area sidebar is-left-sidebar" id="left-sidebar"> <div class="inside-left-sidebar"> <div id="table-of-contents"><div class="toc-title">Table of Contents</div><ul><li><a href="#what-is-cron">What is cron?</a></li><li><a href="#what-is-a-cron-job">What is a Cron job?</a></li><li><a href="#how-do-cron-jobs-work">How do cron jobs work?</a></li><li><a href="#cron-job-monitoring-guide">Cron job monitoring guide</a></li><li><a href="#cron-job-examples">Cron job examples</a></li></ul></div> </div> </div> <div class="widget-area sidebar is-right-sidebar" id="right-sidebar"> <div class="inside-right-sidebar"> <div class="custom-categories-sidebar"><div class="category-item"><div class="category-title">Cron Monitoring<span class="expand-toggle">+</span></div><ul class="category-articles hidden"><li><a href="https://uptimerobot.com/knowledge-hub/cron-monitoring/cron-job-guide/">Our complete cron job guide for 2024</a></li></ul></div><div class="category-item"><div class="category-title">DevOps<span class="expand-toggle">+</span></div><ul class="category-articles hidden"><li><a href="https://uptimerobot.com/knowledge-hub/devops/status-pages-guide/">A Comprehensive Guide to Status Pages in 2024</a></li><li><a href="https://uptimerobot.com/knowledge-hub/devops/incident-management-guide/">Incident Management Guide & Explanation</a></li><li><a href="https://uptimerobot.com/knowledge-hub/devops/nas-vs-cloud/">NAS vs Cloud Storage: A Comprehensive Comparison</a></li><li><a href="https://uptimerobot.com/knowledge-hub/devops/subnet-explained/">Subnet Explained</a></li><li><a href="https://uptimerobot.com/knowledge-hub/devops/ipv4-ipv6/">The difference between IPv4 and IPv6</a></li><li><a href="https://uptimerobot.com/knowledge-hub/devops/incident-management/">Top 15 Incident Management Tools For Efficiency</a></li><li><a href="https://uptimerobot.com/knowledge-hub/devops/hosting-providers/">Best Web Hosting Providers in 2024 for Starters and Beginners</a></li><li><a href="https://uptimerobot.com/knowledge-hub/devops/deployment-tools/">Top 21 Software Deployment Tools</a></li><li><a href="https://uptimerobot.com/knowledge-hub/devops/npm-install/">NPM: How to Install a Specific Version</a></li><li><a href="https://uptimerobot.com/knowledge-hub/devops/dns-record-types-explained/">DNS Record Types: Explained</a></li><li><a href="https://uptimerobot.com/knowledge-hub/devops/guide-to-servers/">A Complete Guide to Servers</a></li><li><a href="https://uptimerobot.com/knowledge-hub/devops/ip-addresses-explained/">IP Addresses: Explained</a></li><li><a href="https://uptimerobot.com/knowledge-hub/devops/ping-explained/">What is ping?</a></li></ul></div><div class="category-item"><div class="category-title">Logging<span class="expand-toggle">+</span></div><ul class="category-articles hidden"><li><a href="https://uptimerobot.com/knowledge-hub/logging/a-guide-to-understanding-log-levels/">A Guide to Understanding Log Levels</a></li></ul></div><div class="category-item"><div class="category-title">Monitoring<span class="expand-toggle">+</span></div><ul class="category-articles hidden"><li><a href="https://uptimerobot.com/knowledge-hub/monitoring/http-status-codes-guide/">HTTP Status Codes Uncovered: Your Ultimate Guide</a></li><li><a href="https://uptimerobot.com/knowledge-hub/monitoring/network-monitoring-guide/">Mastering Network Monitoring: Your Guide to Uninterrupted Excellence</a></li><li><a href="https://uptimerobot.com/knowledge-hub/monitoring/icmp-ping-monitoring/">What Is Ping Monitoring</a></li><li><a href="https://uptimerobot.com/knowledge-hub/monitoring/ssl-certificate-errors/">SSL Certificate Errors: A comprehensive guide</a></li><li><a href="https://uptimerobot.com/knowledge-hub/monitoring/what-is-network-monitoring/">What is network monitoring?</a></li><li><a href="https://uptimerobot.com/knowledge-hub/monitoring/what-is-synthetic-monitoring/">What is Synthetic Monitoring?</a></li><li><a href="https://uptimerobot.com/knowledge-hub/monitoring/cron-jobs/">How to Run Cron Jobs Every 5, 10, 15, or 30 Minutes</a></li><li><a href="https://uptimerobot.com/knowledge-hub/monitoring/post-mortem-meeting/">How to Run a Post-Mortem Meeting – A guide in 2024</a></li><li><a href="https://uptimerobot.com/knowledge-hub/monitoring/snmp-monitoring/">SNMP Monitoring Explained</a></li><li><a href="https://uptimerobot.com/knowledge-hub/monitoring/server-performance-monitoring-tools/">Top 10 Server Performance Monitoring Tools & Software in 2024</a></li></ul></div><div class="category-item"><div class="category-title">Response Time & Page Speed<span class="expand-toggle">+</span></div><ul class="category-articles hidden"><li><a href="https://uptimerobot.com/knowledge-hub/response-time-page-speed/response-time-monitoring-guide/">A Guide to Response Time Monitoring</a></li><li><a href="https://uptimerobot.com/knowledge-hub/response-time-page-speed/website-speed-testing-tools/">The 10 Best Website Speed Testing Tools in 2024</a></li><li><a href="https://uptimerobot.com/knowledge-hub/response-time-page-speed/10-tips-to-improve-website-speed/">10 Tips To Improve Website Speed</a></li></ul></div></div> </div> </div> </div> </div> <div class="site-footer"> <div class="ur-prefix"> <footer class="page-footer uk-section uk-section-secondary uk-section-large uk-position-relative uk-position-z-index"> <div class="uk-container"> <div class="uk-margin-bottom" uk-grid> <div class="uk-width-1-3@l"> <a title="UptimeRobot Homepage" href="/" class="uk-margin-small-bottom uk-display-inline-block"> <img alt="UptimeRobot logo" class="page-logo" src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/images/uptimerobot-logo.svg" width="210" height="23" /> </a> <div> Downtime happens. Get notified! </div> <p class="uk-margin-small uk-text-muted"> Join more than 2,100,000 happy users! UptimeRobot is one of the most popular website monitoring services in the world. </p> <div class="footer-social"> <a aria-label="Go to our Facebook page" class="btn-icon uk-padding-remove-vertical" href="https://www.facebook.com/UptimeRobot/" rel="me noopener" target="_blank" > <i class="fa-brands fa-facebook"></i> </a> <a aria-label="Go to our Twitter profile" class="btn-icon uk-padding-remove-vertical" href="https://twitter.com/uptimerobot" rel="me noopener" target="_blank" > <i class="fa-brands fa-twitter"></i> </a> <a aria-label="Go to our LinkedIn profile" class="btn-icon uk-padding-remove-vertical" href="https://www.linkedin.com/company/uptime-robot/" rel="me noopener" target="_blank" > <i class="fa-brands fa-linkedin"></i> </a> <a aria-label="Go to our Discord channel" class="btn-icon uk-padding-remove-vertical" href="https://discord.gg/JRBar2vA5N" rel="me noopener" target="_blank" > <i class="fa-brands fa-discord"></i> </a> </div> </div> <div class="uk-width-2-3@l"> <div uk-grid> <div class="uk-width-1-3@l"> <h3 class="uk-margin-small-bottom">Monitoring<span class="uk-text-primary">.</span></h3> <ul class="footer-nav uk-text-muted"> <li><a href="/website-monitoring/?ref=footer">Website monitoring</a></li> <li><a href="/ssl-monitoring/?ref=footer">SSL monitoring</a></li> <li><a href="/domain-expiration-monitoring/?ref=footer">Domain monitoring</a></li> <li><a href="/ping-monitoring/?ref=footer">Ping monitoring</a></li> <li><a href="/port-monitoring/?ref=footer">Port monitoring</a></li> <li><a href="/tcp-monitoring/?ref=footer">TCP monitoring</a></li> <li><a href="/cron-job-monitoring/?ref=footer">Cron job monitoring</a></li> <li><a href="/keyword-monitoring/?ref=footer">Keyword monitoring</a></li> </ul> </div> <div class="uk-width-1-3@l"> <h3 class="uk-margin-small-bottom">Company<span class="uk-text-primary">.</span></h3> <ul class="footer-nav uk-text-muted"> <li><a href="/pricing/">Pricing</a></li> <li><a href="https://uptimerobot.com/blog/">Blog</a></li> <li><a href="/affiliate/">Affiliate program</a></li> <li><a href="/sponsorship/">Non profit & charities 🤲</a></li> <li><a href="/terms/">Terms</a> / <a href="/privacy">Privacy</a></li> <li><a href="/contact/">Contact us</a></li> <li> <a class="uk-label uk-label-warning" href="https://itrinitycom.notion.site/Careers-work-with-us-d3796aa492764653af60f7028a87b206" target="_blank" rel="noopener nofollow" style="text-decoration: none !important;"> We are hiring! </a> </li> </ul> </div> <div class="uk-width-1-3@l"> <h3 class="uk-margin-small-bottom">Resources<span class="uk-text-primary">.</span></h3> <ul class="footer-nav uk-text-muted"> <li><a href="/integrations/">Integrations</a></li> <li><a href="/api/">API</a></li> <li><a href="/faq/">FAQs</a></li> <li><a href="/help/">Help center</a></li> <li><a href="/help/locations/">Locations & IPs</a></li> <li><a href="/comparisons/">Comparisons</a></li> </ul> </div> </div> </div> </div> <div class="uk-text-center"> <span class="green-dot is-big is-pulse" uk-tooltip="title: Yes, we are always monitoring! 😉; delay: 1000; pos: bottom"></span> </div> </div> </footer> </div> </div> <a title="Scroll back to top" aria-label="Scroll back to top" rel="nofollow" href="#" class="generate-back-to-top" data-scroll-speed="400" data-start-scroll="300"> <span class="gp-icon icon-arrow-up"><svg viewBox="0 0 330 512" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M305.863 314.916c0 2.266-1.133 4.815-2.832 6.514l-14.157 14.163c-1.699 1.7-3.964 2.832-6.513 2.832-2.265 0-4.813-1.133-6.512-2.832L164.572 224.276 53.295 335.593c-1.699 1.7-4.247 2.832-6.512 2.832-2.265 0-4.814-1.133-6.513-2.832L26.113 321.43c-1.699-1.7-2.831-4.248-2.831-6.514s1.132-4.816 2.831-6.515L158.06 176.408c1.699-1.7 4.247-2.833 6.512-2.833 2.265 0 4.814 1.133 6.513 2.833L303.03 308.4c1.7 1.7 2.832 4.249 2.832 6.515z" fill-rule="nonzero" /></svg></span> </a><script data-cfasync="false" type="text/javascript"> window.civchat = { apiKey: "su5k6k", }; </script> <script data-cfasync="false" type="text/javascript" src="https://uptimerobot.user.com/widget.js"></script> <script type="text/javascript"> document.addEventListener('DOMContentLoaded', function() { var h1Elements = document.querySelectorAll('.kw-header h1'); h1Elements.forEach(function(h1) { var dotSpan = document.createElement('span'); dotSpan.classList.add('h1-dot'); h1.appendChild(dotSpan); }); }); </script> <script id="generate-a11y">!function(){"use strict";if("querySelector"in document&&"addEventListener"in window){var e=document.body;e.addEventListener("mousedown",function(){e.classList.add("using-mouse")}),e.addEventListener("keydown",function(){e.classList.remove("using-mouse")})}}();</script><style id='core-block-supports-inline-css'> .wp-container-core-buttons-is-layout-1{justify-content:center;}.wp-container-core-buttons-is-layout-2{justify-content:center;} </style> <script src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/js/feedback-handler.js" id="mytheme-feedback-handler-js"></script> <script src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/js/table-of-contents.js" id="table-of-contents-js"></script> <script src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/js/custom-search.js?ver=1.0.0" id="custom-search-js"></script> <script src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress-child/assets/js/faq-section.js?ver=1.0.0" id="faq-section-js"></script> <!--[if lte IE 11]> <script src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress/assets/js/classList.min.js?ver=3.4.0" id="generate-classlist-js"></script> <![endif]--> <script id="generate-menu-js-extra"> var generatepressMenu = {"toggleOpenedSubMenus":"1","openSubMenuLabel":"Open Sub-Menu","closeSubMenuLabel":"Close Sub-Menu"}; </script> <script src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress/assets/js/menu.min.js?ver=3.4.0" id="generate-menu-js"></script> <script src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress/assets/js/dropdown-click.min.js?ver=3.4.0" id="generate-dropdown-click-js"></script> <script id="generate-back-to-top-js-extra"> var generatepressBackToTop = {"smooth":"1"}; </script> <script src="https://uptimerobot.com/knowledge-hub/wp-content/themes/generatepress/assets/js/back-to-top.min.js?ver=3.4.0" id="generate-back-to-top-js"></script> <script src="https://uptimerobot.com/knowledge-hub/wp-content/plugins/highlighting-code-block/assets/js/prism.js?ver=2.0.1" id="hcb-prism-js"></script> <script src="https://uptimerobot.com/knowledge-hub/wp-includes/js/clipboard.min.js?ver=2.0.11" id="clipboard-js"></script> <script id="hcb-script-js-extra"> var hcbVars = {"showCopyBtn":"1","copyBtnLabel":"Copy code to clipboard"}; </script> <script src="https://uptimerobot.com/knowledge-hub/wp-content/plugins/highlighting-code-block/build/js/hcb_script.js?ver=2.0.1" id="hcb-script-js"></script> </body> </html>