{"id":9696,"date":"2023-02-17T07:07:57","date_gmt":"2023-02-16T22:07:57","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=9696"},"modified":"2023-09-12T22:32:39","modified_gmt":"2023-09-12T13:32:39","slug":"linux%e3%81%a7%e3%82%b9%e3%82%b1%e3%82%b8%e3%83%a5%e3%83%bc%e3%83%a9%e3%82%92%e5%88%a9%e7%94%a8%e3%81%97%e3%81%a6%e7%b9%b0%e3%82%8a%e8%bf%94%e3%81%97%e3%82%b8%e3%83%a7%e3%83%96%e3%82%92%e5%ae%9f","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/9696","title":{"rendered":"Linux\u3067\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u3092\u5229\u7528\u3057\u3066\u7e70\u308a\u8fd4\u3057\u30b8\u30e7\u30d6\u3092\u5b9f\u884c\u3059\u308b\uff01\uff08cron\uff09"},"content":{"rendered":"<p>\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u3092\u5229\u7528\u3057\u3066\u3001\u7e70\u308a\u8fd4\u3057\u30b8\u30e7\u30d6\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u304c\u8d77\u52d5\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\uff08crond.service\uff09\u304c\u8d77\u52d5\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ systemctl status crond.service\r\n\u25cf crond.service - Command Scheduler\r\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/crond.service; enabled; vendor preset: enabled)\r\n   Active: active (running) since Thu 2023-02-16 20:28:25 JST; 10h ago\r\n Main PID: 1215 (crond)\r\n    Tasks: 1 (limit: 11263)\r\n   Memory: 1.5M\r\n   CGroup: \/system.slice\/crond.service\r\n           \u2514\u25001215 \/usr\/sbin\/crond -n\r\n<\/pre>\n<h2>\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3092\u767b\u9332\u3059\u308b\uff01<\/h2>\n<p>\u300ccrontab -e\u300d\u30b3\u30de\u30f3\u30c9\u3067\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3092\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ crontab -e\r\n*  *  *  *  * sleep 10\r\n<\/pre>\n<h2>\u767b\u9332\u3057\u305f\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>\u300ccrontab -l\u300d\u30b3\u30de\u30f3\u30c9\u3067\u767b\u9332\u3057\u305f\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ crontab -l\r\n*  *  *  *  * sleep 10\r\n<\/pre>\n<h2>\u305d\u306e\u4ed6\u306e\u65b9\u6cd5\u3067\u30b8\u30e7\u30d6\u3092\u5b9a\u7fa9\u3059\u308b\uff01<\/h2>\n<p>crontab\u4ee5\u5916\u306b\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u30b8\u30e7\u30d6\u306e\u5b9f\u884c\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li>\/etc\/cron.hourly\/ \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f 1 \u6642\u9593\u306b 1 \u56de\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/li>\n<li>\/etc\/cron.daily\/ \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f 1 \u65e5\u306b 1 \u56de\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/li>\n<li>\/etc\/cron.weekly\/ \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f 1 \u9031\u9593\u306b 1 \u56de\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/li>\n<li>\/etc\/cron.monthly\/ \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f 1 \u30ab\u6708\u306b 1 \u56de\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0b\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3092\u5b9a\u7fa9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u914d\u7f6e\u3057\u3066\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# ls -l \/etc\/cron.d\r\ntotal 8\r\n-rw-r--r--. 1 root root 128 Jun 12  2019 0hourly\r\n-rw-r--r--. 1 root root 108 Jan 11  2021 raid-check\r\n<\/pre>\n<p>\u66f4\u306b\u3001\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u3082\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# cat \/etc\/crontab\r\nSHELL=\/bin\/bash\r\nPATH=\/sbin:\/bin:\/usr\/sbin:\/usr\/bin\r\nMAILTO=root\r\n\r\n# For details see man 4 crontabs\r\n\r\n# Example of job definition:\r\n# .---------------- minute (0 - 59)\r\n# |  .------------- hour (0 - 23)\r\n# |  |  .---------- day of month (1 - 31)\r\n# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...\r\n# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat\r\n# |  |  |  |  |\r\n# *  *  *  *  * user-name  command to be executed\r\n<\/pre>\n<h2>crontab\u30b3\u30de\u30f3\u30c9\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u8a2d\u5b9a\u3059\u308b\uff01<\/h2>\n<p>at\u30b3\u30de\u30f3\u30c9\u306b\u3064\u3044\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u4f7f\u7528\u3067\u304d\u308b\u30e6\u30fc\u30b6\u3092\u5236\u9650\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u7279\u5b9a\u306e\u30e6\u30fc\u30b6\u306e\u307fcrontab\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u53ef\u80fd\u3068\u3059\u308b\uff01<\/h3>\n<p>\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u3001\u30e6\u30fc\u30b6\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n\/etc\/cron.allow\r\n<\/pre>\n<h3>\u7279\u5b9a\u306e\u30e6\u30fc\u30b6\u306e\u307fat\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u4e0d\u53ef\u3068\u3059\u308b\uff01<\/h3>\n<p>\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u307f\u4f5c\u6210\u3057\u3066\u3001\u30e6\u30fc\u30b6\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002\u300c\/etc\/cron.allow\u300d\u304c\u5b58\u5728\u3059\u308b\u3068\u3001\u3053\u3061\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u7121\u52b9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,3]; title: ; notranslate\" title=\"\">\r\n\/etc\/cron.deny\r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>\u7e70\u308a\u8fd4\u3057\u30b8\u30e7\u30d6\u3092\u5b9f\u884c\u3057\u305f\u3044\u5834\u5408\u306f\u3001cron\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u5b9a\u7fa9\u3059\u308b\u5834\u6240\u304c\u591a\u3044\u3067\u3059\u304c\u3001\u4e00\u822c\u306e\u30e6\u30fc\u30b6\u304c\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u767b\u9332\u3059\u308b\u5834\u5408\u306f\u3001crontab\u30b3\u30de\u30f3\u30c9\u3067\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/9684\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u3067\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u3092\u4f7f\u7528\u3059\u308b\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2021\/02\/fi_linux_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u3067\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u3092\u4f7f\u7528\u3059\u308b\uff01<\/div><div class=\"substr\">Linux\u3067\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<h2>\u95a2\u9023\u66f8\u7c4d\uff08Amazon\uff09<\/h2>\n<p><a href=\"https:\/\/amzn.to\/3H5qkUu\" rel=\"noopener\" target=\"_blank\"><img decoding=\"async\" class=\"paapi5-pa-product-image-source\" src=\"https:\/\/m.media-amazon.com\/images\/I\/51ZPkoBGdZL._SL160_.jpg\" alt=\"N\/A\"><\/a><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u3092\u5229\u7528\u3057\u3066\u3001\u7e70\u308a\u8fd4\u3057\u30b8\u30e7\u30d6\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":5527,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[206],"tags":[1160,282,935,859],"class_list":["post-9696","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scheduler","tag-cron","tag-linux","tag-935","tag-859"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/9696","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=9696"}],"version-history":[{"count":1,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/9696\/revisions"}],"predecessor-version":[{"id":15043,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/9696\/revisions\/15043"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/5527"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=9696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=9696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=9696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}