{"id":754,"date":"2022-08-09T19:28:00","date_gmt":"2022-08-09T12:28:00","guid":{"rendered":"https:\/\/longvan.net\/cong-dong\/?p=754"},"modified":"2022-08-11T13:24:36","modified_gmt":"2022-08-11T06:24:36","slug":"duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux","status":"publish","type":"post","link":"https:\/\/longvan.net\/cong-dong\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\/","title":{"rendered":"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh ch\u1ea1y t\u1ef1 \u0111\u1ed9ng b\u1eb1ng Crontab trong Linux"},"content":{"rendered":"<h4>I. Gi\u1edbi thi\u1ec7u v\u1ec1 crontab<\/h4>\n<ol>\n<li><strong>Crontab l\u00e0 g\u00ec?<\/strong><br \/>\nGi\u1ed1ng nh\u01b0 Task Scheduler tr\u00ean Windows, Crontab l\u00e0 m\u1ed9t ti\u1ec7n \u00edch \u0111\u1ec3 th\u1ef1c hi\u1ec7n c\u00e1c t\u00e1c v\u1ee5 m\u1ed9t c\u00e1ch t\u1ef1 \u0111\u1ed9ng theo m\u1ed9t chu k\u00ec, \u1edf ch\u1ebf \u0111\u1ed9 n\u1ec1n trong h\u1ec7 th\u1ed1ng. Crontab l\u00e0 m\u1ed9t file ch\u1ee9a \u0111\u1ef1ng b\u1ea3ng bi\u1ec3u (schedule) c\u1ee7a c\u00e1c entries \u0111\u01b0\u1ee3c ch\u1ea1y.<\/li>\n<li><strong>Crontab ho\u1ea1t \u0111\u1ed9ng ra sao.<\/strong><br \/>\nCron Schedule ch\u1ec9 l\u00e0 m\u1ed9t file text v\u00e0 th\u01b0\u1eddng n\u1eb1m \u1edf v\u1ecb tr\u00ed l\u00e0 \u1edf<em> \/var\/spool\/cron <\/em>. B\u1ea1n s\u1ebd kh\u00f4ng th\u1ec3 d\u00f9ng c\u00e1c t\u1ec7p th\u00f4ng th\u01b0\u1eddng ho\u1eb7c ch\u1ec9nh s\u1eeda tr\u1ef1c ti\u1ebfp b\u1eb1ng c\u00e1c ph\u1ea7n m\u1ec1m edit. C\u00e1ch duy nh\u1ea5t b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng l\u00e0 d\u00f9ng l\u1ec7nh Crontab.<\/li>\n<\/ol>\n<h4><strong>II. H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh crontab<\/strong><\/h4>\n<ol>\n<li><strong>M\u1ed9t s\u1ed1 l\u1ec7nh th\u01b0\u1eddng d\u00f9ng<\/strong>\n<ul>\n<li><strong>crontab -e<\/strong>: d\u00f9ng \u0111\u1ec3 t\u1ea1o ho\u1eb7c ch\u1ec9nh s\u1eeda file crontab.<\/li>\n<li><strong>crontab -l<\/strong>: hi\u1ec3n th\u1ecb file crontab.<\/li>\n<li><strong>crontab -r<\/strong> : x\u00f3a file crontab.<\/li>\n<\/ul>\n<\/li>\n<li><strong>C\u1ea5u tr\u00fac<\/strong> c\u1ee7a 1 crontab bao g\u1ed3m 5 tr\u01b0\u1eddng x\u00e1c \u0111\u1ecbnh th\u1eddi gian, cu\u1ed1i c\u00f9ng l\u00e0 l\u1ec7nh \u0111\u1ec3 ch\u1ea1y theo \u0111\u1ecbnh k\u00ec th\u1eddi , c\u1ee5 th\u1ec3 nh\u01b0 sau:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-852\" src=\"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/08\/Crontab.drawio.png\" alt=\"\" width=\"610\" height=\"265\" srcset=\"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/08\/Crontab.drawio.png 610w, https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/08\/Crontab.drawio-300x130.png 300w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><br \/>\nNgo\u00e0i ra, m\u1ed9t s\u1ed1 c\u00e1ch s\u1eed d\u1ee5ng \u0111\u1eb7c bi\u1ec7t c\u1ea7n l\u01b0u \u00fd:<\/p>\n<ul>\n<li><span style=\"color: #ff0000;\"><strong>,<\/strong> <\/span>\u0111\u1ec3 \u0111\u1eb7t l\u1ecbch ch\u1ea1y nhi\u1ec1u th\u1eddi \u0111i\u1ec3m kh\u00e1c nhau. V\u00ed d\u1ee5 ch\u1ea1y script v\u00e0o l\u00fac 5h v\u00e0 9h:\n<pre><span style=\"color: #0000ff;\">*  5,9  *  *  *\u00a0 \u00a0\/script\/script.sh<\/span><\/pre>\n<\/li>\n<li><span style=\"color: #ff0000;\"><strong><span style=\"color: #ff0000;\">\/<\/span><\/strong>\u00a0 <span style=\"color: #000000;\">\u0111\u1ec3 \u0111\u1eb7t l\u1ecbch ch\u1ea1y<\/span><\/span> sau m\u1ed7i th\u1eddi gian ch\u1ec9 \u0111\u1ecbnh. V\u00ed d\u1ee5 ch\u1ea1y script 3 ti\u1ebfng l\u1ea7n:\n<pre><span style=\"color: #0000ff;\">*  *\/3  *  *  *   \/script\/script.sh<\/span><\/pre>\n<\/li>\n<li><span style=\"color: #ff0000;\"><strong>&#8211;<\/strong>\u00a0<\/span> \u0111\u1ec3 \u0111\u1eb7t l\u1ecbch ch\u1ea1y trong m\u1ed9t kho\u1ea3n th\u1eddi gian gi\u1edbi h\u1ea1n, V\u00ed d\u1ee5 ch\u1ea1y script t\u1eeb 3h t\u1edbi 5h:\n<pre><span style=\"color: #0000ff;\">*  3-5  *  *  *\u00a0  \/script\/script.sh<\/span><\/pre>\n<\/li>\n<li><span style=\"color: #ff0000;\">@yearly<\/span> l\u00e0 ch\u1ea1y h\u1eb1ng n\u0103m, v\u00ed d\u1ee5: <span style=\"color: #0000ff;\">@yeraly\u00a0 \/script\/script.sh<\/span><\/li>\n<li><span style=\"color: #ff0000;\">@monthly<\/span> l\u00e0 ch\u1ea1y h\u1eb1ng th\u00e1ng, v\u00ed d\u1ee5: <span style=\"color: #0000ff;\">@monthly \/script\/script.sh<\/span><\/li>\n<li><span style=\"color: #ff0000;\">@weekly<\/span> l\u00e0 ch\u1ea1y h\u1eb1ng tu\u1ea7n, v\u00ed d\u1ee5: <span style=\"color: #0000ff;\">@weekly \/script\/script.sh<\/span><\/li>\n<li><span style=\"color: #ff0000;\">@daily<\/span> l\u00e0 ch\u1ea1y h\u1eb1ng ng\u00e0y, v\u00ed d\u1ee5: <span style=\"color: #0000ff;\">@daily\u00a0 \/script\/script.sh<\/span><\/li>\n<li><span style=\"color: #ff0000;\">@hourly<\/span> l\u00e0 ch\u1ea1y h\u1eb1ng gi\u1edd, v\u00ed d\u1ee5: <span style=\"color: #0000ff;\">@hourly\u00a0 \/script\/script.sh<\/span><\/li>\n<li><span style=\"color: #ff0000;\">@reboot<\/span> l\u00e0 ch\u1ea1y sau khi reboot, v\u00ed d\u1ee5: <span style=\"color: #0000ff;\">@reboot\u00a0 \/script\/script.sh\u00a0<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><strong>\u00a0 3. V\u00ed d\u1ee5 c\u1ee5 th\u1ec3 qu\u00e1 tr\u00ecnh c\u1ea5u h\u00ecnh h\u1ec7 th\u1ed1ng t\u1ef1 \u0111\u1ed9ng reboot v\u00e0o l\u00fac 23:00 t\u1ed1i h\u1eb1ng ng\u00e0y<\/strong><\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><strong><b>B\u01b0\u1edbc 1<\/b><\/strong>: Ta v\u00e0o g\u00f5 crontab -e \u0111\u1ec3 t\u1ea1o 1 file crontab.\n<pre># crontab -e<\/pre>\n<\/li>\n<li><strong><b>B\u01b0\u1edbc 2<\/b><\/strong>: Ta tr\u00ecnh b\u00e0y \u0111\u00fang c\u00fa ph\u00e1p \u0111\u1ec3 x\u00e1c nh\u1eadn 1 cron job.\n<pre>0  23  *  *  *  sudo shutdown -r<\/pre>\n<\/li>\n<li>L\u01b0u l\u1ea1i l\u1ea1i file c\u1ea5u h\u00ecnh v\u00e0 restart services crontab b\u1eb1ng l\u00eanh\n<pre>systemctl restart crond<\/pre>\n<\/li>\n<li>\u0110\u1ec3 ki\u1ec3m tra l\u1ea1i c\u1ea5u h\u00ecnh \u0111\u00e3 thi\u1ebft l\u00e2p\n<pre># crontab -l<\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Nh\u01b0 v\u1eady, Long V\u00e2n \u0111\u00e3 h\u01b0\u1edbng d\u1eabn Qu\u00fd kh\u00e1ch th\u1ef1c hi\u1ec7n vi\u1ec7c l\u1eadp l\u1ecbch ch\u1ea1y t\u1ef1 \u0111\u1ed9ng b\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng Crontab. Ch\u00fac Qu\u00fd kh\u00e1ch th\u00e0nh !<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I. Gi\u1edbi thi\u1ec7u v\u1ec1 crontab Crontab l\u00e0 g\u00ec? Gi\u1ed1ng nh\u01b0 Task Scheduler tr\u00ean Windows, Crontab l\u00e0 m\u1ed9t ti\u1ec7n \u00edch \u0111\u1ec3 th\u1ef1c hi\u1ec7n c\u00e1c t\u00e1c v\u1ee5 m\u1ed9t c\u00e1ch t\u1ef1 \u0111\u1ed9ng theo m\u1ed9t chu k\u00ec, \u1edf ch\u1ebf \u0111\u1ed9 n\u1ec1n trong h\u1ec7 th\u1ed1ng. Crontab l\u00e0 m\u1ed9t file ch\u1ee9a \u0111\u1ef1ng b\u1ea3ng bi\u1ec3u (schedule) c\u1ee7a c\u00e1c entries \u0111\u01b0\u1ee3c ch\u1ea1y. Crontab [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_oasis_is_in_workflow":0,"_oasis_original":0,"footnotes":""},"categories":[4],"tags":[58,59,61,5,62,60],"class_list":["post-754","post","type-post","status-publish","format-standard","hentry","category-linux","tag-crond","tag-crontab","tag-lap-lich","tag-linux","tag-schedule","tag-tu-dong"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh ch\u1ea1y t\u1ef1 \u0111\u1ed9ng b\u1eb1ng Crontab trong Linux - Long V\u00e2n<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/longvan.net\/cong-dong\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\/\" \/>\n<meta property=\"og:locale\" content=\"vi_VN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh ch\u1ea1y t\u1ef1 \u0111\u1ed9ng b\u1eb1ng Crontab trong Linux - Long V\u00e2n\" \/>\n<meta property=\"og:description\" content=\"I. Gi\u1edbi thi\u1ec7u v\u1ec1 crontab Crontab l\u00e0 g\u00ec? Gi\u1ed1ng nh\u01b0 Task Scheduler tr\u00ean Windows, Crontab l\u00e0 m\u1ed9t ti\u1ec7n \u00edch \u0111\u1ec3 th\u1ef1c hi\u1ec7n c\u00e1c t\u00e1c v\u1ee5 m\u1ed9t c\u00e1ch t\u1ef1 \u0111\u1ed9ng theo m\u1ed9t chu k\u00ec, \u1edf ch\u1ebf \u0111\u1ed9 n\u1ec1n trong h\u1ec7 th\u1ed1ng. Crontab l\u00e0 m\u1ed9t file ch\u1ee9a \u0111\u1ef1ng b\u1ea3ng bi\u1ec3u (schedule) c\u1ee7a c\u00e1c entries \u0111\u01b0\u1ee3c ch\u1ea1y. Crontab [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/longvan.net\/cong-dong\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Long V\u00e2n\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-09T12:28:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-11T06:24:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/08\/Crontab.drawio.png\" \/>\n\t<meta property=\"og:image:width\" content=\"610\" \/>\n\t<meta property=\"og:image:height\" content=\"265\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Mai V\u0103n Chung\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mai V\u0103n Chung\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 ph\u00fat\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\\\/\"},\"author\":{\"name\":\"Mai V\u0103n Chung\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#\\\/schema\\\/person\\\/0f5bb4435e991d494ff8f4b132e5ed8b\"},\"headline\":\"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh ch\u1ea1y t\u1ef1 \u0111\u1ed9ng b\u1eb1ng Crontab trong Linux\",\"datePublished\":\"2022-08-09T12:28:00+00:00\",\"dateModified\":\"2022-08-11T06:24:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\\\/\"},\"wordCount\":556,\"publisher\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/Crontab.drawio.png\",\"keywords\":[\"crond\",\"crontab\",\"l\u1eadp l\u1ecbch\",\"Linux\",\"schedule\",\"t\u1ef1 \u0111\u1ed9ng\"],\"articleSection\":[\"Linux\"],\"inLanguage\":\"vi\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\\\/\",\"url\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\\\/\",\"name\":\"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh ch\u1ea1y t\u1ef1 \u0111\u1ed9ng b\u1eb1ng Crontab trong Linux - Long V\u00e2n\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/Crontab.drawio.png\",\"datePublished\":\"2022-08-09T12:28:00+00:00\",\"dateModified\":\"2022-08-11T06:24:36+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\\\/#breadcrumb\"},\"inLanguage\":\"vi\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\\\/#primaryimage\",\"url\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/Crontab.drawio.png\",\"contentUrl\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/Crontab.drawio.png\",\"width\":610,\"height\":265},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Trang ch\u1ee7\",\"item\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh ch\u1ea1y t\u1ef1 \u0111\u1ed9ng b\u1eb1ng Crontab trong Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#website\",\"url\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/\",\"name\":\"Long V\u00e2n\",\"description\":\"C\u1ed9ng \u0110\u1ed3ng\",\"publisher\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"vi\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#organization\",\"name\":\"Long V\u00e2n\",\"url\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/wp-content\\\/uploads\\\/2025\\\/11\\\/cropped-logo-longvancloudsolution.png\",\"contentUrl\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/wp-content\\\/uploads\\\/2025\\\/11\\\/cropped-logo-longvancloudsolution.png\",\"width\":1300,\"height\":330,\"caption\":\"Long V\u00e2n\"},\"image\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#\\\/schema\\\/person\\\/0f5bb4435e991d494ff8f4b132e5ed8b\",\"name\":\"Mai V\u0103n Chung\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/201def381d0ff0c15e626fc20b54d828d1d99708c72f9d8dc178c924cf993552?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/201def381d0ff0c15e626fc20b54d828d1d99708c72f9d8dc178c924cf993552?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/201def381d0ff0c15e626fc20b54d828d1d99708c72f9d8dc178c924cf993552?s=96&d=mm&r=g\",\"caption\":\"Mai V\u0103n Chung\"},\"sameAs\":[\"http:\\\/\\\/longvan.net\"],\"url\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/author\\\/vanchung\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh ch\u1ea1y t\u1ef1 \u0111\u1ed9ng b\u1eb1ng Crontab trong Linux - Long V\u00e2n","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:\/\/longvan.net\/cong-dong\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\/","og_locale":"vi_VN","og_type":"article","og_title":"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh ch\u1ea1y t\u1ef1 \u0111\u1ed9ng b\u1eb1ng Crontab trong Linux - Long V\u00e2n","og_description":"I. Gi\u1edbi thi\u1ec7u v\u1ec1 crontab Crontab l\u00e0 g\u00ec? Gi\u1ed1ng nh\u01b0 Task Scheduler tr\u00ean Windows, Crontab l\u00e0 m\u1ed9t ti\u1ec7n \u00edch \u0111\u1ec3 th\u1ef1c hi\u1ec7n c\u00e1c t\u00e1c v\u1ee5 m\u1ed9t c\u00e1ch t\u1ef1 \u0111\u1ed9ng theo m\u1ed9t chu k\u00ec, \u1edf ch\u1ebf \u0111\u1ed9 n\u1ec1n trong h\u1ec7 th\u1ed1ng. Crontab l\u00e0 m\u1ed9t file ch\u1ee9a \u0111\u1ef1ng b\u1ea3ng bi\u1ec3u (schedule) c\u1ee7a c\u00e1c entries \u0111\u01b0\u1ee3c ch\u1ea1y. Crontab [&hellip;]","og_url":"https:\/\/longvan.net\/cong-dong\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\/","og_site_name":"Long V\u00e2n","article_published_time":"2022-08-09T12:28:00+00:00","article_modified_time":"2022-08-11T06:24:36+00:00","og_image":[{"width":610,"height":265,"url":"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/08\/Crontab.drawio.png","type":"image\/png"}],"author":"Mai V\u0103n Chung","twitter_card":"summary_large_image","twitter_misc":{"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi":"Mai V\u0103n Chung","\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc":"3 ph\u00fat"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/longvan.net\/cong-dong\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\/#article","isPartOf":{"@id":"https:\/\/longvan.net\/cong-dong\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\/"},"author":{"name":"Mai V\u0103n Chung","@id":"https:\/\/longvan.net\/cong-dong\/#\/schema\/person\/0f5bb4435e991d494ff8f4b132e5ed8b"},"headline":"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh ch\u1ea1y t\u1ef1 \u0111\u1ed9ng b\u1eb1ng Crontab trong Linux","datePublished":"2022-08-09T12:28:00+00:00","dateModified":"2022-08-11T06:24:36+00:00","mainEntityOfPage":{"@id":"https:\/\/longvan.net\/cong-dong\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\/"},"wordCount":556,"publisher":{"@id":"https:\/\/longvan.net\/cong-dong\/#organization"},"image":{"@id":"https:\/\/longvan.net\/cong-dong\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/08\/Crontab.drawio.png","keywords":["crond","crontab","l\u1eadp l\u1ecbch","Linux","schedule","t\u1ef1 \u0111\u1ed9ng"],"articleSection":["Linux"],"inLanguage":"vi"},{"@type":"WebPage","@id":"https:\/\/longvan.net\/cong-dong\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\/","url":"https:\/\/longvan.net\/cong-dong\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\/","name":"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh ch\u1ea1y t\u1ef1 \u0111\u1ed9ng b\u1eb1ng Crontab trong Linux - Long V\u00e2n","isPartOf":{"@id":"https:\/\/longvan.net\/cong-dong\/#website"},"primaryImageOfPage":{"@id":"https:\/\/longvan.net\/cong-dong\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\/#primaryimage"},"image":{"@id":"https:\/\/longvan.net\/cong-dong\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/08\/Crontab.drawio.png","datePublished":"2022-08-09T12:28:00+00:00","dateModified":"2022-08-11T06:24:36+00:00","breadcrumb":{"@id":"https:\/\/longvan.net\/cong-dong\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\/#breadcrumb"},"inLanguage":"vi","potentialAction":[{"@type":"ReadAction","target":["https:\/\/longvan.net\/cong-dong\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\/"]}]},{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/longvan.net\/cong-dong\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\/#primaryimage","url":"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/08\/Crontab.drawio.png","contentUrl":"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2022\/08\/Crontab.drawio.png","width":610,"height":265},{"@type":"BreadcrumbList","@id":"https:\/\/longvan.net\/cong-dong\/duong-dan-cau-hinh-chay-tu-dong-bang-crontab-trong-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Trang ch\u1ee7","item":"https:\/\/longvan.net\/cong-dong\/"},{"@type":"ListItem","position":2,"name":"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh ch\u1ea1y t\u1ef1 \u0111\u1ed9ng b\u1eb1ng Crontab trong Linux"}]},{"@type":"WebSite","@id":"https:\/\/longvan.net\/cong-dong\/#website","url":"https:\/\/longvan.net\/cong-dong\/","name":"Long V\u00e2n","description":"C\u1ed9ng \u0110\u1ed3ng","publisher":{"@id":"https:\/\/longvan.net\/cong-dong\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/longvan.net\/cong-dong\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"vi"},{"@type":"Organization","@id":"https:\/\/longvan.net\/cong-dong\/#organization","name":"Long V\u00e2n","url":"https:\/\/longvan.net\/cong-dong\/","logo":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/longvan.net\/cong-dong\/#\/schema\/logo\/image\/","url":"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2025\/11\/cropped-logo-longvancloudsolution.png","contentUrl":"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2025\/11\/cropped-logo-longvancloudsolution.png","width":1300,"height":330,"caption":"Long V\u00e2n"},"image":{"@id":"https:\/\/longvan.net\/cong-dong\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/longvan.net\/cong-dong\/#\/schema\/person\/0f5bb4435e991d494ff8f4b132e5ed8b","name":"Mai V\u0103n Chung","image":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/secure.gravatar.com\/avatar\/201def381d0ff0c15e626fc20b54d828d1d99708c72f9d8dc178c924cf993552?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/201def381d0ff0c15e626fc20b54d828d1d99708c72f9d8dc178c924cf993552?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/201def381d0ff0c15e626fc20b54d828d1d99708c72f9d8dc178c924cf993552?s=96&d=mm&r=g","caption":"Mai V\u0103n Chung"},"sameAs":["http:\/\/longvan.net"],"url":"https:\/\/longvan.net\/cong-dong\/author\/vanchung\/"}]}},"_links":{"self":[{"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/posts\/754","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/comments?post=754"}],"version-history":[{"count":24,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/posts\/754\/revisions"}],"predecessor-version":[{"id":911,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/posts\/754\/revisions\/911"}],"wp:attachment":[{"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/media?parent=754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/categories?post=754"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/tags?post=754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}