{"id":3063,"date":"2018-11-02T00:00:57","date_gmt":"2018-11-01T15:00:57","guid":{"rendered":"https:\/\/shell-mag.com\/?p=3063"},"modified":"2018-11-17T19:39:16","modified_gmt":"2018-11-17T10:39:16","slug":"24th_linuxoperations","status":"publish","type":"post","link":"https:\/\/shell-mag.com\/24th_linuxoperations\/","title":{"rendered":"\u7b2c24\u56de\u3000\u5b9a\u671f\u7684\u306b\u30b8\u30e7\u30d6\u3092\u5b9f\u884c\u3059\u308b\uff08cron\uff09"},"content":{"rendered":"<p>\u65e5\u3005\u306e\u30b5\u30fc\u30d0\u30fc\u306e\u904b\u7528\u7ba1\u7406\u3068\u3057\u3066\u3001\u6c7a\u307e\u3063\u305f\u6642\u9593\u3001\u6c7a\u307e\u3063\u305f\u66dc\u65e5\u3001\u6c7a\u307e\u3063\u305f\u65e5\u306b\u3061\u306b\u3001\u3042\u308b\u51e6\u7406\uff08\u30b8\u30e7\u30d6\uff09\u3092\u5b9f\u884c\u3059\u308b\u3068\u3044\u3046\u4f5c\u696d\u306f\u3088\u304f\u3042\u308a\u307e\u3059\u3002Linux\u306b\u306f\u3001\u305d\u306e\u3088\u3046\u306a\u6642\u9593\u3001\u66dc\u65e5\u3001\u65e5\u4ed8\u3092\u6307\u5b9a\u3057\u3066\u30b8\u30e7\u30d6\u3092\u81ea\u52d5\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f\u306e\u300ccron\u300d\uff08\u30af\u30ed\u30fc\u30f3\u307e\u305f\u306f\u30af\u30fc\u30ed\u30f3\uff09\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001\u3053\u306ecron\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002cron\u3067\u306f\u3001\u3042\u3089\u304b\u3058\u3081\u5b9f\u884c\u65e5\u6642\u3084\u66dc\u65e5\u3001\u30b8\u30e7\u30d6\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u3092\u8a18\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u3057\u3066\u304a\u304d\u307e\u3059\u3002\u305d\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u306b\u5f93\u3063\u3066\u3001\u5e38\u99d0\u30d7\u30ed\u30b0\u30e9\u30e0\uff08\u30c7\u30fc\u30e2\u30f3\uff09\u300ccrond\u300d\u304c\u6c7a\u3081\u3089\u308c\u305f\u65e5\u6642\u3084\u66dc\u65e5\u306b\u3001\u6307\u5b9a\u3055\u308c\u305f\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\uff08<strong>\u56f31<\/strong>\uff09\u3002<\/p>\n<div id=\"attachment_3064\" style=\"width: 528px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3064\" class=\" wp-image-3064\" src=\"https:\/\/shell-mag.com\/wp-content\/uploads\/2018\/10\/zu1-2-300x191.png\" alt=\"\" width=\"518\" height=\"330\" srcset=\"https:\/\/shell-mag.com\/wp-content\/uploads\/2018\/10\/zu1-2-300x191.png 300w, https:\/\/shell-mag.com\/wp-content\/uploads\/2018\/10\/zu1-2-768x489.png 768w, https:\/\/shell-mag.com\/wp-content\/uploads\/2018\/10\/zu1-2.png 794w\" sizes=\"auto, (max-width: 518px) 100vw, 518px\" \/><p id=\"caption-attachment-3064\" class=\"wp-caption-text\">\u56f31\u3000\u6c7a\u307e\u3063\u305f\u65e5\u6642\u3084\u66dc\u65e5\u306b\u30b8\u30e7\u30d6\u3092\u81ea\u52d5\u5b9f\u884c\u3059\u308b\u300ccron\u300d<\/p><\/div>\n<p><!--nextpage--><\/p>\n<h2>cronatb\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b<\/h2>\n<p>crond\u304c\u5b9f\u884c\u3059\u308b\u30b8\u30e7\u30d6\u3001\u5b9f\u884c\u65e5\u6642\u3084\u66dc\u65e5\u3092\u8a18\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u300ccrontab\u300d\u3068\u547c\u3073\u307e\u3059\u3002\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u3054\u3068\u306b\u4f5c\u6210\u3067\u304d\u3001\u4f5c\u6210\u3057\u305f\u30e6\u30fc\u30b6\u30fc\uff08\u6240\u6709\u8005\uff09\u306e\u6a29\u9650\u3067\u30b8\u30e7\u30d6\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<br \/>\ncrontab\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210\u306b\u306f\u3001\u300ccrontab\u300d\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002\u6b21\u306e\u3088\u3046\u306b\u300c-e\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u3051\u3066\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"theme:dark-terminal lang:sh decode:true\">$ crontab -e\r\n<\/pre>\n<p>\u521d\u3081\u3066\u5b9f\u884c\u3057\u305f\u3068\u304d\u306b\u3001\u7de8\u96c6\u3059\u308b\u30a8\u30c7\u30a3\u30bf\u3092\u9078\u3076\u30e1\u30cb\u30e5\u30fc\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u300c2\u300d\u306e\u300cnano\u300d\u30a8\u30c7\u30a3\u30bf\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u306e\u307e\u307e\uff3bEnter\uff3d\u30ad\u30fc\u3092\u62bc\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"theme:dark-terminal lang:sh decode:true\">no crontab for taro - using an empty one\r\n\r\nSelect an editor.  To change later, run 'select-editor'.\r\n  1. \/bin\/ed\r\n  2. \/bin\/nano        &lt;---- easiest\r\n  3. \/usr\/bin\/vim.basic\r\n  4. \/usr\/bin\/vim.tiny\r\n\r\nChoose 1-4 [2]:\r\n<\/pre>\n<p>nano\u30a8\u30c7\u30a3\u30bf\u4e0a\u306bcrontab\u30d5\u30a1\u30a4\u30eb\u306e\u7de8\u96c6\u753b\u9762\u304c\u958b\u304d\u307e\u3059\uff08<strong>\u56f32<\/strong>\uff09\u3002<\/p>\n<div id=\"attachment_3065\" style=\"width: 440px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3065\" class=\" wp-image-3065\" src=\"https:\/\/shell-mag.com\/wp-content\/uploads\/2018\/10\/zu2-1-300x203.png\" alt=\"\" width=\"430\" height=\"291\" srcset=\"https:\/\/shell-mag.com\/wp-content\/uploads\/2018\/10\/zu2-1-300x203.png 300w, https:\/\/shell-mag.com\/wp-content\/uploads\/2018\/10\/zu2-1.png 639w\" sizes=\"auto, (max-width: 430px) 100vw, 430px\" \/><p id=\"caption-attachment-3065\" class=\"wp-caption-text\">\u56f32\u3000crontab\u30d5\u30a1\u30a4\u30eb\u306e\u7de8\u96c6\u753b\u9762<\/p><\/div>\n<p><!--nextpage--><\/p>\n<h2>\u30b8\u30e7\u30d6\u3092\u81ea\u52d5\u5b9f\u884c\u3059\u308b\u8a2d\u5b9a\u306e\u66f8\u5f0f<\/h2>\n<p>\u300c#\u300d\u3067\u59cb\u307e\u308b\u884c\u306f\u30b3\u30e1\u30f3\u30c8\u3067\u3059\u3002\u30b8\u30e7\u30d6\u3092\u81ea\u52d5\u3067\u5b9f\u884c\u3059\u308b\u8a2d\u5b9a\u306f\u3001\u6b21\u306e\u66f8\u5f0f\u3067\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<p><strong><span style=\"color: #00ccff;\">\u5206 \u6642 \u65e5 \u6708 \u66dc\u65e5 \u30b3\u30de\u30f3\u30c9<\/span><\/strong><\/p>\n<p>\u300c\u5206\u300d\u306f\u300c0\u300d\uff5e\u300c59\u300d\u3001\u300c\u6642\u300d\u306f\u300c0\u300d\uff5e\u300c23\u300d\u3001\u300c\u65e5\u300d\u306f\u300c1\u300d\uff5e\u300c31\u300d\u3001\u300c\u6708\u300d\u306f\u300c1\u300d\uff5e\u300c12\u300d\u307e\u305f\u306f\u300cjan\u300d\uff5e\u300cdec\u300d\u3001\u300c\u66dc\u65e5\u300d\u306f\u300c0\u300d\uff08\u65e5\u66dc\uff09\uff5e\u300c6\u300d\uff08\u571f\u66dc\uff09\u3001\u300c7\u300d\uff08\u65e5\u66dc\uff09\u307e\u305f\u306f\u300csun\u300d\uff5e\u300csat\u300d\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002\u3059\u3079\u3066\u3092\u8868\u3059\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\uff08*\uff09\u3082\u4f7f\u3048\u307e\u3059\u3002\u300c*\/<span style=\"color: #00ccff;\">\u6570\u5024<\/span>\u300d\u3068\u66f8\u3051\u3070\u3001\u6570\u5024\u3067\u6307\u5b9a\u3057\u305f\u5206\u5358\u4f4d\u3001\u6642\u9593\u5358\u4f4d\u306a\u3069\u306e\u6307\u5b9a\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u306f1\u884c\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002\u300c\/bin\u300d\u300c\/sbin\u300d\u300c\/usr\/bin\u300d\u300c\/usr\/bin\u300d\u306a\u3069\u306e\u30d1\u30b9\u3092\u542b\u3081\u3066\u30b3\u30de\u30f3\u30c9\u3092\u6307\u5b9a\u3057\u306a\u3044\u3068\u52d5\u4f5c\u3057\u306a\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u300cwhich <span style=\"color: #00ccff;\">\u30b3\u30de\u30f3\u30c9\u540d<\/span>\u300d\u3067\u3001\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9\u304c\u3069\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u306e\u304b\u3092\u8abf\u3079\u3066\u7d76\u5bfe\u30d1\u30b9\u3067\u6307\u5b9a\u3059\u308b\u306e\u304c\u3088\u3044\u3067\u3057\u3087\u3046\u3002\u307e\u305f\u3001\u300cPATH\u300d\u306e\u74b0\u5883\u5909\u6570\u304c\u4f7f\u3048\u307e\u3059\u3002\u3088\u3063\u3066\u3001\u30b8\u30e7\u30d6\u306e\u81ea\u52d5\u5b9f\u884c\u8a2d\u5b9a\u306e\u524d\u306b\u3001\u30b3\u30de\u30f3\u30c9\u304c\u683c\u7d0d\u3057\u3066\u3044\u308b\u30d1\u30b9\u3092PATH\u5909\u6570\u306b\u683c\u7d0d\u3059\u308b\u8a2d\u5b9a\u3092\u8a18\u8ff0\u3057\u3066\u304a\u304f\u306e\u3082\u3088\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p><!--nextpage--><\/p>\n<h2>\u5b9f\u969b\u306e\u8a2d\u5b9a\u3092\u66f8\u304d\u8fbc\u3080<\/h2>\n<p>\u5b9f\u969b\u306b\u6b21\u306e\u8a2d\u5b9a\u3092\u66f8\u304d\u52a0\u3048\u3066\u4fdd\u5b58\u3057\u3066\u307f\u307e\u3059\u3002\u3053\u306e\u4f8b\u3067\u306f\u30015\u5206\u306b1\u56de\uff08\u300c*\/5\u300d\u306e\u3088\u3046\u306b\u8a18\u8ff0\uff09\u3001crontab\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u306e\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u5185\u306b\u300cdate.txt\u300d\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u305d\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u30b8\u30e7\u30d6\u3092\u5b9f\u884c\u3057\u305f\u65e5\u6642\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:sh decode:true\">PATH=$PATH:\/bin:\/usr\/bin:\/sbin:\/usr\/sbin\r\n*\/5 * * * * date &gt;&gt; ~\/date.txt\r\n<\/pre>\n<p>\u4fdd\u5b58\u3057\u305f\u6642\u70b9\u3067\u3001\u30b8\u30e7\u30d6\u306e\u81ea\u52d5\u5b9f\u884c\u304c\u958b\u59cb\u3057\u307e\u3059\u300210\u5206\u4ee5\u4e0a\u5f85\u3063\u3066\u304b\u3089\u3001<\/p>\n<pre class=\"theme:dark-terminal lang:sh decode:true\">$ cat ~\/date.txt\r\n2018\u5e74 10\u6708 31\u65e5 \u6c34\u66dc\u65e5 15:40:01 JST\r\n2018\u5e74 10\u6708 31\u65e5 \u6c34\u66dc\u65e5 15:45:01 JST\r\n<\/pre>\n<p>\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u4e0a\u306e\u3088\u3046\u306b\u4e8c\u3064\u4ee5\u4e0a\u306e\u65e5\u6642\u304c\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>cron\u306b\u3088\u308b\u30b8\u30e7\u30d6\u306e\u81ea\u52d5\u5b9f\u884c\u304c\u3046\u307e\u304f\u52d5\u4f5c\u3057\u307e\u3057\u305f\u3002\u3053\u306e\u8a2d\u5b9a\u3092\u8a18\u8ff0\u3057\u305fcrontab\u30d5\u30a1\u30a4\u30eb\u306f\u300c\/var\/spool\/cron\/crontabs\/<span style=\"color: #00ccff;\">\u30e6\u30fc\u30b6\u30fc\u540d<\/span>\u300d\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u306a\u304a\u3001\u300c\/var\/spool\/cron\/crontabs\u300d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306b\u306f\u30b7\u30b9\u30c6\u30e0\u7ba1\u7406\u8005\uff08root\u30e6\u30fc\u30b6\u30fc\uff09\u3057\u304b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093\u3002\u78ba\u8a8d\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u7ba1\u7406\u8005\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u4f8b\u306b\u3057\u305f\u30b8\u30e7\u30d6\u306e\u81ea\u52d5\u5b9f\u884c\u3092\u305d\u306e\u307e\u307e\u653e\u7f6e\u3057\u3066\u304a\u304f\u3068date.txt\u30d5\u30a1\u30a4\u30eb\u304c\u5927\u304d\u304f\u306a\u308b\u306e\u3067\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3067\u8a2d\u5b9a\u3092\u524a\u9664\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"theme:dark-terminal lang:sh decode:true\">$ crontab -r\r\n<\/pre>\n<p><!--nextpage--><\/p>\n<h2>\u30b7\u30b9\u30c6\u30e0\u306b\u95a2\u9023\u3059\u308b\u30b8\u30e7\u30d6\u306e\u81ea\u52d5\u5b9f\u884c<\/h2>\n<p>\u30b7\u30b9\u30c6\u30e0\u306b\u95a2\u9023\u3059\u308b\u30b8\u30e7\u30d6\u306e\u81ea\u52d5\u5b9f\u884c\u306e\u8a2d\u5b9a\u306f\u300c\/etc\/crontab\u300d\u30d5\u30a1\u30a4\u30eb\u304a\u3088\u3073\u300c\/etc\/cron.d\u300d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306e\u4e0b\u306b\u3042\u308b\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u307e\u308c\u3066\u3044\u307e\u3059\u3002\/etc\/crontab\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u306f\u3001\u6b21\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<pre class=\"theme:dark-terminal lang:sh decode:true \"># \/etc\/crontab: system-wide crontab\r\n# Unlike any other crontab you don't have to run the `crontab'\r\n# command to install the new version when you edit this file\r\n# and files in \/etc\/cron.d. These files also have username fields,\r\n# that none of the other crontabs do.\r\n\r\nSHELL=\/bin\/sh\r\nPATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/sbin:\/bin:\/usr\/sbin:\/usr\/bin\r\n\r\n# m h dom mon dow user  command\r\n17 *    * * *   root    cd \/ &amp;&amp; run-parts --report \/etc\/cron.hourly\r\n25 6    * * *   root    test -x \/usr\/sbin\/anacron || ( cd \/ &amp;&amp; run-parts --report \/etc\/cron.daily )\r\n47 6    * * 7   root    test -x \/usr\/sbin\/anacron || ( cd \/ &amp;&amp; run-parts --report \/etc\/cron.weekly )\r\n52 6    1 * *   root    test -x \/usr\/sbin\/anacron || ( cd \/ &amp;&amp; run-parts --report \/etc\/cron.monthly )<\/pre>\n<p>\/etc\/crontab\u30d5\u30a1\u30a4\u30eb\u304a\u3088\u3073\/etc\/cron.d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306e\u4e0b\u306b\u3042\u308b\u30d5\u30a1\u30a4\u30eb\u3067\u306f\u3001\u30b8\u30e7\u30d6\u3092\u81ea\u52d5\u3067\u5b9f\u884c\u3059\u308b\u8a2d\u5b9a\u3092\u6b21\u306e\u66f8\u5f0f\u3067\u8a18\u8ff0\u3057\u307e\u3059\u3002\u5148\u306b\u793a\u3057\u305f\u3082\u306e\u3068\u5c11\u3057\u7570\u306a\u308b\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong><span style=\"color: #00ccff;\">\u5206 \u6642 \u65e5 \u6708 \u66dc\u65e5 \u30e6\u30fc\u30b6\u30fc\u540d \u30b3\u30de\u30f3\u30c9<\/span><\/strong><\/p>\n<p>\u300c\u30e6\u30fc\u30b6\u30fc\u540d\u300d\u306b\u306f\u3001\u30b8\u30e7\u30d6\u3092\u5b9f\u884c\u3059\u308b\u30e6\u30fc\u30b6\u30fc\u3092\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\/etc\/crontab\u30d5\u30a1\u30a4\u30eb\u306b\u306f\u3001\u6bce\u65e5\u3001\u6bce\u9031\u3001\u6bce\u6708\u6c7a\u3081\u3089\u308c\u305f\u3068\u304d\u306b\u5b9f\u884c\u3059\u308b\u30b8\u30e7\u30d6\u3092\u307e\u3068\u3081\u3066\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002\u4e00\u65b9\u3001\/etc\/cron.d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306e\u4e0b\u306b\u3042\u308b\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u4efb\u610f\u306b\u65e5\u6642\u3001\u66dc\u65e5\u306b\u5b9f\u884c\u3059\u308b\u30b8\u30e7\u30d6\u306e\u8a2d\u5b9a\u304c\u8a18\u8ff0\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\/etc\/crontab\u30d5\u30a1\u30a4\u30eb\u306e\u672b\u5c3e\u306b\u3042\u308b4\u884c\u304c\u30b8\u30e7\u30d6\u3092\u81ea\u52d5\u5b9f\u884c\u3059\u308b\u8a2d\u5b9a\u3067\u3059\u3002\u4e0a\u304b\u3089\u3001\u6bce\u664217\u5206\u306b\u300c\/etc\/cron.hourly\u300d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306b\u3042\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u3001\u6bce\u65e56\u664225\u5206\u306b\u300c\/etc\/cron.daily\u300d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306b\u3042\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u3001\u65e5\u66dc\u65e5\u306e6\u664247\u5206\u306b\u300c\/etc\/cron.weekly\u300d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306b\u3042\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u3001\u6bce\u67081\u65e5\u306e6\u664252\u5206\u306b\u300c\/etc\/cron.monthly\u300d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306b\u3042\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u300crun-parts\u300d\u306f\u6307\u5b9a\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u5185\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3084\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002\u300ctest -x \/usr\/sbin\/anacron ||\u300d\u306f\u3001\u300c\/usr\/sbin\/anacron\u300d\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3057\u306a\u3044\u3068\u304d\u306b\u3001\u305d\u306e\u5f8c\u308d\u306b\u6307\u5b9a\u3057\u305f\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u51e6\u7406\u3092\u8868\u3057\u3066\u3044\u307e\u3059\u3002\u300canacron\u300d\u306f\u3001cron\u3068\u540c\u3058\u3088\u3046\u306b\u30b8\u30e7\u30d6\u3092\u81ea\u52d5\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u3002\u30b7\u30b9\u30c6\u30e0\u306b\u95a2\u9023\u3059\u308b\u3082\u306e\u3068\u3057\u3066\u3001\u3069\u306e\u3088\u3046\u306a\u30b8\u30e7\u30d6\u3092\u5b9f\u884c\u3057\u3066\u3044\u308b\u304b\u306f\u3001\/etc\/cron.hourly\u3001\/etc\/cron.daily\u3001\/etc\/cron.weekly\u3001\/etc\/cron.monthly\u5185\u306b\u3042\u308b\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3092\u898b\u308b\u3068\u5206\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><!--nextpage--><\/p>\n<h2>\u30b8\u30e7\u30d6\u306e\u81ea\u52d5\u5b9f\u884c\u3092\u8a2d\u5b9a\u3067\u304d\u308b\u30e6\u30fc\u30b6\u30fc\u3092\u5236\u9650\u3059\u308b<\/h2>\n<p>\u521d\u671f\u72b6\u614b\u3067\u306f\u3001\u3069\u306e\u30e6\u30fc\u30b6\u30fc\u3082crontab\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3067\u304d\u3001\u30b8\u30e7\u30d6\u306e\u81ea\u52d5\u5b9f\u884c\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u30b5\u30fc\u30d0\u30fc\u74b0\u5883\u3067\u306f\u3001\u7ba1\u7406\u8005\u304c\u628a\u63e1\u3057\u3066\u3044\u306a\u3044\u30b8\u30e7\u30d6\u3092\u52dd\u624b\u306b\u81ea\u52d5\u5b9f\u884c\u3055\u308c\u3066\u306f\u56f0\u308b\u3067\u3057\u3087\u3046\u3002\u30e6\u30fc\u30b6\u30fc\u306b\u5bfe\u3057\u3066crontab\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210\u30fb\u7de8\u96c6\u3092\u5236\u9650\u3057\u305f\u3044\u5834\u5408\u306b\u306f\u3001\u300c\/etc\/cron.allow\u300d\u3068\u300c\/etc\/cron.deny\u300d\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u300ctaro\u300d\u3068\u3044\u3046\u30e6\u30fc\u30b6\u30fc\u3060\u3051\u306bcrontab\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210\u30fb\u7de8\u96c6\u3092\u8a31\u53ef\u3059\u308b\u306e\u306a\u3089\u3001\u300c\/etc\/cron.allow\u300d\u30d5\u30a1\u30a4\u30eb\u306b\u3001<\/p>\n<pre class=\"lang:default decode:true\">taro<\/pre>\n<p>\u306e\u3088\u3046\u306b\u30e6\u30fc\u30b6\u30fc\u540d\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002\u5225\u306e\u30e6\u30fc\u30b6\u30fc\u304ccrontab\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u6b21\u306e\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u3066cronatb\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"theme:dark-terminal lang:sh decode:true\">$ crontab -e\r\nYou (\u30e6\u30fc\u30b6\u30fc\u540d) are not allowed to use this program (crontab)\r\nSee crontab(1) for more information<\/pre>\n<p>\u8a31\u53ef\u3057\u305f\u3044\u30e6\u30fc\u30b6\u30fc\u6570\u304c\u5c11\u306a\u3044\u5834\u5408\u306f\/etc\/cron.allow\u30d5\u30a1\u30a4\u30eb\u306b\u8a31\u53ef\u3059\u308b\u30e6\u30fc\u30b6\u30fc\u306e\u30e6\u30fc\u30b6\u30fc\u540d\u3092\u3001\u7981\u6b62\u3057\u305f\u3044\u30e6\u30fc\u30b6\u30fc\u6570\u304c\u5c11\u306a\u3044\u5834\u5408\u306f\/etc\/cron.deny\u30d5\u30a1\u30a4\u30eb\u306b\u7981\u6b62\u3059\u308b\u30e6\u30fc\u30b6\u30fc\u306e\u30e6\u30fc\u30b6\u30fc\u540d\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002\u306a\u304a\u3001\u4e21\u65b9\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u540c\u3058\u30e6\u30fc\u30b6\u30fc\u540d\u3092\u8a18\u8ff0\u3057\u305f\u5834\u5408\u306f\u3001\u8a31\u53ef\u304c\u512a\u5148\u3055\u308c\u307e\u3059\u3002\u307e\u305f\u3001\u30b7\u30b9\u30c6\u30e0\u7ba1\u7406\u8005\u306eroot\u30e6\u30fc\u30b6\u30fc\u3060\u3051\u306f\u7981\u6b62\u306b\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<h2>\u6700\u5f8c\u306b<\/h2>\n<p>\u4eca\u56de\u306f\u3001\u6c7a\u307e\u3063\u305f\u6642\u9593\u3001\u6c7a\u307e\u3063\u305f\u66dc\u65e5\u3001\u6c7a\u307e\u3063\u305f\u65e5\u306b\u3061\u306b\u30b8\u30e7\u30d6\u3092\u81ea\u52d5\u5b9f\u884c\u3059\u308bcron\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002cron\u4ee5\u5916\u306b\u3082\u3001\u524d\u8ff0\u3057\u305fanacron\u3084\u300cat\u300d\u306a\u3069\u306e\u30b8\u30e7\u30d6\u81ea\u52d5\u5b9f\u884c\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u3042\u308a\u307e\u3059\u3002anacron\u306a\u3089\u3001\u30b8\u30e7\u30d6\u306e\u81ea\u52d5\u5b9f\u884c\u6642\u9593\u306b\u30b5\u30fc\u30d0\u30fc\u304c\u505c\u6b62\u3057\u3066\u3044\u3066\u3082\u65e5\u5358\u4f4d\u3001\u9031\u5358\u4f4d\u3001\u6708\u5358\u4f4d\u3067\u5b9f\u884c\u3057\u306a\u3051\u308c\u3070\u3044\u3051\u306a\u3044\u30b8\u30e7\u30d6\u3092\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002at\u30b3\u30de\u30f3\u30c9\u3067\u306f\u3001\u6307\u5b9a\u3057\u305f\u65e5\u6642\u306b1\u5ea6\u3060\u3051\u30b8\u30e7\u30d6\u3092\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u6b21\u56de\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306e\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3088\u308a\u3082\u7d30\u304b\u3044\u30a2\u30af\u30bb\u30b9\u5236\u5fa1\u304c\u3067\u304d\u308b\u300cACL\u300d\uff08Access Control Lists\uff09\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p style=\"text-align: right;\">written by \u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u30de\u30ac\u30b8\u30f3\u7de8\u96c6\u90e8\uff08\u3042\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u65e5\u3005\u306e\u30b5\u30fc\u30d0\u30fc\u306e\u904b\u7528\u7ba1\u7406\u3068\u3057\u3066\u3001\u6c7a\u307e\u3063\u305f\u6642\u9593\u3001\u6c7a\u307e\u3063\u305f\u66dc\u65e5\u3001\u6c7a\u307e\u3063\u305f\u65e5\u306b\u3061\u306b\u3001\u3042\u308b\u51e6\u7406\uff08\u30b8\u30e7\u30d6\uff09\u3092\u5b9f\u884c\u3059\u308b\u3068\u3044\u3046\u4f5c\u696d\u306f\u3088\u304f\u3042\u308a\u307e\u3059\u3002Linux\u306b\u306f\u3001\u305d\u306e\u3088\u3046\u306a\u6642\u9593\u3001\u66dc\u65e5\u3001\u65e5\u4ed8\u3092\u6307\u5b9a\u3057\u3066\u30b8\u30e7\u30d6\u3092\u81ea\u52d5\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f\u306e\u300ccron\u300d\uff08\u30af\u30ed\u30fc\u30f3\u307e\u305f\u306f\u30af\u30fc\u30ed\u30f3\uff09\u304c\u3042\u308a\u307e\u3059\u3002 \u4eca\u56de\u306f\u3001\u3053\u306ecron\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002cron\u3067\u306f\u3001\u3042\u3089\u304b\u3058\u3081\u5b9f\u884c\u65e5\u6642\u3084\u66dc\u65e5\u3001\u30b8\u30e7\u30d6\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u3092\u8a18\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f<a href=\"https:\/\/shell-mag.com\/24th_linuxoperations\/\">\uff3b\u2026\uff3d<\/a><\/p>\n","protected":false},"author":9,"featured_media":3064,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-3063","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-article"],"_links":{"self":[{"href":"https:\/\/shell-mag.com\/wp-json\/wp\/v2\/posts\/3063","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shell-mag.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shell-mag.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shell-mag.com\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/shell-mag.com\/wp-json\/wp\/v2\/comments?post=3063"}],"version-history":[{"count":14,"href":"https:\/\/shell-mag.com\/wp-json\/wp\/v2\/posts\/3063\/revisions"}],"predecessor-version":[{"id":3155,"href":"https:\/\/shell-mag.com\/wp-json\/wp\/v2\/posts\/3063\/revisions\/3155"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/shell-mag.com\/wp-json\/wp\/v2\/media\/3064"}],"wp:attachment":[{"href":"https:\/\/shell-mag.com\/wp-json\/wp\/v2\/media?parent=3063"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shell-mag.com\/wp-json\/wp\/v2\/categories?post=3063"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shell-mag.com\/wp-json\/wp\/v2\/tags?post=3063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}