{"id":1730,"date":"2022-11-15T12:30:00","date_gmt":"2022-11-15T18:30:00","guid":{"rendered":"https:\/\/linuxhostsupport.com\/blog\/?p=1730"},"modified":"2022-12-05T07:17:18","modified_gmt":"2022-12-05T13:17:18","slug":"10-useful-cron-commands-in-linux-with-examples","status":"publish","type":"post","link":"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/","title":{"rendered":"10 Useful cron Commands in Linux With Examples"},"content":{"rendered":"\n<div id=\"linux-4114439421\" class=\"linux-before-1st-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1339&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div><p>In this tutorial, we will explain ten useful cron commands in Linux with examples.<\/p>\n\n\n\n<p>The cron command is used for scheduling tasks to be executed in a specific period, like a month, day, hour, minute, or even seconds. The cron uses a table of tabs called crontabs which have a list of commands that need to be executed with their times respectively. These cron commands are used by system administrators mostly, to make their work easier and be sure not to forget to execute something during a specific period of their work.<\/p>\n\n\n\n<p>In this tutorial, we are going to use <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting\/\" title=\"\">Ubuntu 20.04<\/a>, but you can choose any Linux distro you want. Let&#8217;s get started!<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Fresh install of Ubuntu 20.04 OS<\/li>\n\n\n\n<li>User privileges: root or non-root user with sudo privileges<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Update the System<\/h2>\n\n\n\n<p>Before we start with the ten useful cron commands, we need to update the system packages to the latest versions available.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt update -y &amp;&amp; sudo apt upgrade -y<\/pre>\n\n\n\n<p>Once the system is updated, we are ready to show you the basic cron commands in Linux.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Manage crond service<\/h2>\n\n\n\n<p>To check the status of the crond service, execute the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl status cron.service<\/pre>\n\n\n\n<p>You should receive the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@host:~# systemctl status cron.service\n\u25cf cron.service - Regular background program processing daemon\n     Loaded: loaded (\/lib\/systemd\/system\/cron.service; enabled; vendor preset: enabled)\n     Active: active (running) since Mon 2022-08-08 23:57:40 CEST; 1 weeks 3 days ago\n       Docs: man:cron(8)\n   Main PID: 583 (cron)\n      Tasks: 1 (limit: 4611)\n     Memory: 11.7M\n     CGroup: \/system.slice\/cron.service\n             \u2514\u2500583 \/usr\/sbin\/cron -f\n<\/pre>\n\n\n\n<p>For starting, stopping, and restarting the cron service, you can use the following commands respectively:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl start cron.service\n\nsystemctl stop cron.service\n\nsystemctl restart cron.service\n\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">2. List the jobs<\/h2>\n\n\n\n<p>To list the jobs for the current user, execute the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">crontab -l<\/pre>\n\n\n\n<p>The output should look similar to this because we do not have cron jobs set yet:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@host:\/var\/www\/html# crontab -l\nno crontab for root<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3. Create your first cron job<\/h2>\n\n\n\n<p>To create your first cron job execute the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">crontab -e<\/pre>\n\n\n\n<p>After executing this command, the file will be opened, and you can paste the following lines of code:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">1 0 * * *   root cd \/var\/www\/html &amp;&amp; \/usr\/bin\/sh script.sh<\/pre>\n\n\n\n<p>Save the file and close it. If you execute the command <strong>crontab -l<\/strong>, you will get this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@host:\/var\/www\/html# crontab -l\n# Edit this file to introduce tasks to be run by cron.\n#\n# Each task to run has to be defined through a single line\n# indicating with different fields when the task will be run\n# and what command to run for the task\n#\n# To define the time you can provide concrete values for\n# minute (m), hour (h), day of month (dom), month (mon),\n# and day of week (dow) or use '*' in these fields (for 'any').\n#\n# Notice that tasks will be started based on the cron's system\n# daemon's notion of time and timezones.\n#\n# Output of the crontab jobs (including errors) is sent through\n# email to the user the crontab file belongs to (unless redirected).\n#\n# For example, you can run a backup of all your user accounts\n# at 5 a.m every week with:\n# 0 5 * * 1 tar -zcf \/var\/backups\/home.tgz \/home\/\n#\n# For more information see the manual pages of crontab(5) and cron(8)\n#\n# m h  dom mon dow   command\n1 0 * * *   cd \/var\/www\/html &amp;&amp; \/usr\/bin\/sh script.sh<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">4. Schedule a job every 10 minutes<\/h2>\n\n\n\n<p>To schedule a job to run every 10 minutes, add the following lines with the crontab -e command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">*\/10 * * * * root cd \/var\/www\/html &amp;&amp; \/usr\/bin\/sh script.sh\n<\/pre>\n\n\n\n<p>This cron will call the script every 10 minutes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">5. Schedule a job every hour<\/h2>\n\n\n\n<p>To schedule a cron job to run every hour, add the following lines with the crontab -e command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">0 * * * * root cd \/var\/www\/html &amp;&amp; \/usr\/bin\/sh script.sh<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">6. Schedule a job every day at 10:00 AM<\/h2>\n\n\n\n<p>Now, we will show you a different way to schedule a cron job. Open the file <strong>\/etc\/crontab<\/strong>. You should see the following lines of code:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># \/etc\/crontab: system-wide crontab\n# Unlike any other crontab you don't have to run the `crontab'\n# command to install the new version when you edit this file\n# and files in \/etc\/cron.d. These files also have username fields,\n# that none of the other crontabs do.\n\nSHELL=\/bin\/sh\nPATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/sbin:\/bin:\/usr\/sbin:\/usr\/bin\n\n# Example of job definition:\n# .---------------- minute (0 - 59)\n# |  .------------- hour (0 - 23)\n# |  |  .---------- day of month (1 - 31)\n# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...\n# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat\n# |  |  |  |  |\n# *  *  *  *  * user-name command to be executed\n17 *    * * *   root    cd \/ &amp;&amp; run-parts --report \/etc\/cron.hourly\n25 6    * * *   root    test -x \/usr\/sbin\/anacron || ( cd \/ &amp;&amp; run-parts --report \/etc\/cron.daily )\n47 6    * * 7   root    test -x \/usr\/sbin\/anacron || ( cd \/ &amp;&amp; run-parts --report \/etc\/cron.weekly )\n52 6    1 * *   root    test -x \/usr\/sbin\/anacron || ( cd \/ &amp;&amp; run-parts --report \/etc\/cron.monthly )\n#\n<\/pre>\n\n\n\n<p>Now to add the cron job to execute every day at 10:00 AM, just add the following line at the bottom of the file, save it and close it.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">0 0 * * * root cd \/var\/www\/html &amp;&amp; \/usr\/bin\/sh script.sh<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">7. Schedule a job At 12:00 AM, only on Friday<\/h2>\n\n\n\n<p>To schedule this job, open the <strong>\/etc\/crontab<\/strong> file and paste the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">0 0 * * FRI root cd \/var\/www\/html &amp;&amp; \/usr\/bin\/sh script.sh<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">8. Schedule a job for a daily backup<\/h2>\n\n\n\n<p>To schedule a daily backup, for example, with some script that will execute commands to generate a daily backup, you do not have to specify intervals. You just need to place the script to the \/etc\/cron.daily directory on your server:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">9. Understanding the cron directories<\/h2>\n\n\n\n<p>In the previous example, we explained how to enable daily backup by putting some script into it. What if we want our script to be executed hourly, weekly, or monthly? Do not worry about that. Just execute ls -al \/etc\/cron and <strong>hit tab<\/strong> in your terminal server:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@host:\/var\/www\/html# ll \/etc\/cron\ncron.d\/       cron.daily\/   cron.hourly\/  cron.monthly\/ crontab       cron.weekly\/<\/pre>\n\n\n\n<p>As you can see, there are directories for different periods where you can place your scripts, which will be executed automatically.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">10. Man command for cron<\/h2>\n\n\n\n<p>If you want to learn more about the cron, you must execute <strong>man cron<\/strong> in your terminal. You should receive complete documentation about the cron command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CRON(8)                                                               System Manager's Manual                                                               CRON(8)\n\nNAME\n       cron - daemon to execute scheduled commands (Vixie Cron)\n\nSYNOPSIS\n       cron [-f] [-l] [-L loglevel]\n\nDESCRIPTION\n       cron is started automatically from \/etc\/init.d on entering multi-user runlevels.\n\nOPTIONS\n       -f      Stay in foreground mode, don't daemonize.\n\n       -l      Enable  LSB  compliant  names  for  \/etc\/cron.d  files.   This  setting,  however,  does  not  affect  the  parsing of files under \/etc\/cron.hourly,\n               \/etc\/cron.daily, \/etc\/cron.weekly or \/etc\/cron.monthly.\n\n       -n      Include the FQDN in the subject when sending mails.  By default, cron will abbreviate the hostname.\n\n       -L loglevel\n               Tell cron what to log about jobs (errors are logged regardless of this value) as the sum of the following values:\n<\/pre>\n\n\n\n<p>That&#8217;s it. You just learned how to set up cron jobs on your own in different ways. If you find this difficult and you want some specific cron at a specific time, just contact our technical support, and they will do the rest. We are available 24\/7.<\/p>\n\n\n\n<p>If you liked this post about ten useful cron commands in <a href=\"https:\/\/linuxhostsupport.com\/\" title=\"\">Linux<\/a> with examples, please share it with your friends on social networks or simply leave a reply below.<\/p><div id=\"linux-1655561454\" class=\"linux-after-8th-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1340&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we will explain ten useful cron commands in Linux with examples. The cron command is used for scheduling tasks to be executed in a specific period, like a month, day, hour, minute, or even seconds. The cron uses a table of tabs called crontabs which have a list of commands that need [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1731,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,228],"tags":[231,45,79],"class_list":["post-1730","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides","category-linux","tag-cron","tag-linux","tag-linux-host-support"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>10 Useful cron Commands in Linux With Examples | LinuxHostSupport<\/title>\n<meta name=\"description\" content=\"In this in-depth tutorial, we will explain ten useful cron commands in Linux with real examples. Read on to find out more about this topic!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"10 Useful cron Commands in Linux With Examples\" \/>\n<meta property=\"og:description\" content=\"In this in-depth tutorial, we will explain ten useful cron commands in Linux with real examples. Read on to find out more about this topic!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxHostSupport\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/linuxhostsupport\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-15T18:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-05T13:17:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/11\/useful-cron-commands-in-linux.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"10 Useful cron Commands in Linux With Examples\" \/>\n<meta name=\"twitter:description\" content=\"In this in-depth tutorial, we will explain ten useful cron commands in Linux with real examples. Read on to find out more about this topic!\" \/>\n<meta name=\"twitter:creator\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:site\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb\"},\"headline\":\"10 Useful cron Commands in Linux With Examples\",\"datePublished\":\"2022-11-15T18:30:00+00:00\",\"dateModified\":\"2022-12-05T13:17:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/\"},\"wordCount\":658,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/11\/useful-cron-commands-in-linux.webp\",\"keywords\":[\"cron\",\"linux\",\"Linux host support\"],\"articleSection\":[\"Guides\",\"Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/\",\"url\":\"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/\",\"name\":\"10 Useful cron Commands in Linux With Examples | LinuxHostSupport\",\"isPartOf\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/11\/useful-cron-commands-in-linux.webp\",\"datePublished\":\"2022-11-15T18:30:00+00:00\",\"dateModified\":\"2022-12-05T13:17:18+00:00\",\"author\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb\"},\"description\":\"In this in-depth tutorial, we will explain ten useful cron commands in Linux with real examples. Read on to find out more about this topic!\",\"breadcrumb\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/#primaryimage\",\"url\":\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/11\/useful-cron-commands-in-linux.webp\",\"contentUrl\":\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/11\/useful-cron-commands-in-linux.webp\",\"width\":742,\"height\":372,\"caption\":\"useful cron commands in linux\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/linuxhostsupport.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"10 Useful cron Commands in Linux With Examples\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#website\",\"url\":\"https:\/\/linuxhostsupport.com\/blog\/\",\"name\":\"LinuxHostSupport\",\"description\":\"Linux Tutorials and Guides\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/linuxhostsupport.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\/\/linuxhostsupport.com\/blog\/author\/r0s3admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"10 Useful cron Commands in Linux With Examples | LinuxHostSupport","description":"In this in-depth tutorial, we will explain ten useful cron commands in Linux with real examples. Read on to find out more about this topic!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/","og_locale":"en_US","og_type":"article","og_title":"10 Useful cron Commands in Linux With Examples","og_description":"In this in-depth tutorial, we will explain ten useful cron commands in Linux with real examples. Read on to find out more about this topic!","og_url":"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/","og_site_name":"LinuxHostSupport","article_publisher":"https:\/\/www.facebook.com\/linuxhostsupport","article_published_time":"2022-11-15T18:30:00+00:00","article_modified_time":"2022-12-05T13:17:18+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/11\/useful-cron-commands-in-linux.webp","type":"image\/webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_title":"10 Useful cron Commands in Linux With Examples","twitter_description":"In this in-depth tutorial, we will explain ten useful cron commands in Linux with real examples. Read on to find out more about this topic!","twitter_creator":"@lnxhostsupport","twitter_site":"@lnxhostsupport","twitter_misc":{"Written by":"admin","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/#article","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/"},"author":{"name":"admin","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"headline":"10 Useful cron Commands in Linux With Examples","datePublished":"2022-11-15T18:30:00+00:00","dateModified":"2022-12-05T13:17:18+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/"},"wordCount":658,"commentCount":0,"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/11\/useful-cron-commands-in-linux.webp","keywords":["cron","linux","Linux host support"],"articleSection":["Guides","Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/","url":"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/","name":"10 Useful cron Commands in Linux With Examples | LinuxHostSupport","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/#primaryimage"},"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/11\/useful-cron-commands-in-linux.webp","datePublished":"2022-11-15T18:30:00+00:00","dateModified":"2022-12-05T13:17:18+00:00","author":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"description":"In this in-depth tutorial, we will explain ten useful cron commands in Linux with real examples. Read on to find out more about this topic!","breadcrumb":{"@id":"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/#primaryimage","url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/11\/useful-cron-commands-in-linux.webp","contentUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/11\/useful-cron-commands-in-linux.webp","width":742,"height":372,"caption":"useful cron commands in linux"},{"@type":"BreadcrumbList","@id":"https:\/\/linuxhostsupport.com\/blog\/10-useful-cron-commands-in-linux-with-examples\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxhostsupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"10 Useful cron Commands in Linux With Examples"}]},{"@type":"WebSite","@id":"https:\/\/linuxhostsupport.com\/blog\/#website","url":"https:\/\/linuxhostsupport.com\/blog\/","name":"LinuxHostSupport","description":"Linux Tutorials and Guides","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxhostsupport.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/linuxhostsupport.com\/blog\/author\/r0s3admin\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/comments?post=1730"}],"version-history":[{"count":3,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1730\/revisions"}],"predecessor-version":[{"id":1734,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1730\/revisions\/1734"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media\/1731"}],"wp:attachment":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media?parent=1730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/categories?post=1730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/tags?post=1730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}