{"id":267,"date":"2011-07-10T15:13:12","date_gmt":"2011-07-10T06:13:12","guid":{"rendered":"http:\/\/takanix.com\/?p=267"},"modified":"2011-07-26T19:09:02","modified_gmt":"2011-07-26T10:09:02","slug":"%e3%80%90cron%e3%80%91%e6%8c%87%e5%ae%9a%e6%99%82%e9%96%93%e3%81%abphp%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0%e3%82%92%e5%ae%9f%e8%a1%8c%e3%81%99%e3%82%8b%e3%80%82%e8%a8%ad%e5%ae%9a%e8%a6%9a","status":"publish","type":"post","link":"https:\/\/takanix.com\/?p=267","title":{"rendered":"\u3010cron\u3011\u6307\u5b9a\u6642\u9593\u306bPHP\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3002\u8a2d\u5b9a\u899a\u3048\u66f8\u304d\uff08\u30c9\u30e9\u30a4\u30d6\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\uff09"},"content":{"rendered":"<p>\u7d50\u69cb\u3001cron\u3068\u3044\u3046\u304bSSH\u3067\u306e\u8a2d\u5b9a\u306f\u5acc\u3067\u3059\u306d\u3002<br \/>\n\u81ea\u793e\u30b5\u30fc\u30d0\u30fc\u306a\u3089\u307e\u3060\u3044\u3044\u3051\u3069\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30b5\u30fc\u30d0\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\u306e\u306f\u7d50\u69cb\u6c17\u3092\u3064\u3051\u308b\u3057\u75b2\u308c\u307e\u3059\u3002<\/p>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30b5\u30fc\u30d0\u30fc\u300cDrive Network\uff08\u30c9\u30e9\u30a4\u30d6\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\uff09\u300d\u3067\u3059\u304c\u3001\u8a2d\u5b9a\u65b9\u6cd5\u3092\u30e1\u30e2\u3057\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n\u4ed6\u306e\u30b5\u30fc\u30d0\u30fc\u306f\u3001\u7ba1\u7406\u753b\u9762\u304c\u3042\u308a\u305d\u3053\u3067cron\u8a2d\u5b9a\u304c\u51fa\u6765\u307e\u3059\u304c\u3001\u7ba1\u7406\u753b\u9762\u304c\u306a\u304fSSH\u306e\u307f\u3067\u306e\u8a2d\u5b9a\u306e\u5834\u5408\u306b\u5f79\u7acb\u3064\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u30b5\u30fc\u30d0\u30fc\uff1aFreeBSD Linux\u306a\u3089\u540c\u3058\u304b\u3068\u3002<br \/>\n\u5f53\u65b9\u3001Mac OS X Lion\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u4f7f\u3063\u3066\u4f5c\u696d\u3002OSX\u306a\u3089\u3069\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3082\u5927\u4e08\u592b\u3002<\/p>\n<p>\uff11\uff09SSH\u63a5\u7d9a<br \/>\nUNIX\u30b3\u30de\u30f3\u30c9\u3000\u300cssh \u30b7\u30b9\u30c6\u30e0\u30a2\u30ab\u30a6\u30f3\u30c8\u540d@\u30b5\u30a4\u30c8\u30c9\u30e1\u30a4\u30f3\u300d\u3092\u5165\u529b\u3057\u307e\u3059\u3002<br \/>\nDrive Network\u306e\u5834\u5408\u306f\u3001cs\u304b\u3089\u306f\u3058\u307e\u308b\u756a\u53f7\u304c\u30b7\u30b9\u30c6\u30e0\u30a2\u30ab\u30a6\u30f3\u30c8\u540d\u3068\u306a\u308b\u306e\u3067\u3001\u300cssh cs123456789@test.com\u300d\u3068\u3044\u3046\u611f\u3058\u3067\u3002<br \/>\nDrive Network\u306f\u3001\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u8907\u6570\u4f5c\u308c\u307e\u3059\u304c\u300cadmin\u300d\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u203badmin@\u301c\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u30b7\u30b9\u30c6\u30e0\u30a2\u30ab\u30a6\u30f3\u30c8\u540d\u3092\u4f7f\u3063\u3066\u4e0b\u3055\u3044\u306d\u3002\u00a0\u5206\u304b\u3089\u306a\u3051\u308c\u3070\u3001Drive Network\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u30d8\u30eb\u30d7\u30da\u30fc\u30b8\u2192\u30a2\u30ab\u30a6\u30f3\u30c8\u60c5\u5831\u4e00\u89a7\u3067\u3001\u30b7\u30b9\u30c6\u30e0\u30a2\u30ab\u30a6\u30f3\u30c8\u540d\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u3069\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>ssh\u301c\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3059\u308b\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u5165\u529b\u304c\u6c42\u3081\u3089\u308c\u308b\u306e\u3067\u3001admin@\u301c\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002<br \/>\n\u203b\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u3001\u8868\u793a\u3055\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u6b63\u3057\u304f\u901a\u308b\u3068\u3001\u4e0b\u8a18\u8d64\u67a0\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/takanix.com\/wp-content\/uploads\/2011\/07\/screenshot3.jpg\"><img loading=\"lazy\" src=\"https:\/\/takanix.com\/wp-content\/uploads\/2011\/07\/screenshot3.jpg\" title=\"screenshot\" width=\"577\" height=\"633\" class=\"aligncenter size-medium wp-image-272\" srcset=\"https:\/\/takanix.com\/wp-content\/uploads\/2011\/07\/screenshot3.jpg 577w, https:\/\/takanix.com\/wp-content\/uploads\/2011\/07\/screenshot3-273x300.jpg 273w\" sizes=\"(max-width: 577px) 100vw, 577px\" \/><\/a><\/p>\n<p style=\"text-align: left;\">\u4e0a\u8a18\u306e\u300c0 0 * * 1 \/usr\/local\/bin\/php \/home\/cs123456789\/test.com\/htdocs\/test\/test.php\u300d\u306e\u3088\u3046\u306a\u4e00\u884c\u306f\u3001\u6307\u793a\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002<\/p>\n<p style=\"text-align: left;\">Drive Network\u306f\u3001\u300c\/home\/\u5951\u7d04\u30a2\u30ab\u30a6\u30f3\u30c8\u756a\u53f7\/\u30c9\u30e1\u30a4\u30f3\/htdocs\/\u301c\u300d\u304c\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u6307\u793a\u306b\u306a\u308a\u307e\u3059\u3002\u30d5\u30a1\u30a4\u30eb\u540d\u306f\u3001home\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304b\u3089\u306e\u76f8\u5bfe\u30d1\u30b9\u3067\u66f8\u3044\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<p style=\"text-align: left;\">\uff12\uff09\u3042\u3068\u306f\u3001\u8a2d\u5b9a\u3060\u3051\u3067\u3059\u3002<br \/>\ncrontab -l\u3000\u3067\u8a2d\u5b9a\u5185\u5bb9\u306e\u78ba\u8a8d\u3002<br \/>\ncrontab -r\u3000\u3067\u8a2d\u5b9a\u524a\u9664\u3002\u524a\u9664\u3059\u308b\u304b\u3068\u805e\u304b\u308c\u305f\u3089\u3001\u300cy\u300d\u304b\u300cn\u300d\u3092\u5165\u529b\u3067\u524a\u9664\u3067\u304d\u307e\u3059\u3002<br \/>\ncrontab -e\u3000\u3067\u7de8\u96c6\u3002vi\u3068\u3044\u3046\u30a8\u30c7\u30a3\u30bf\u304c\u30bf\u30fc\u30df\u30ca\u30eb\u5185\u3067\u305f\u3061\u3042\u304c\u308b\u306e\u3067\u3001\u305d\u3053\u3067\u64cd\u4f5c\u3002<\/p>\n<p style=\"text-align: left;\">\uff13\uff09\u57fa\u672c\u7684\u306avi\u306e\u64cd\u4f5c\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u3059\u3002<\/p>\n<p style=\"text-align: left;\">crontab -e<\/p>\n<p style=\"text-align: left;\">\u307e\u305a\u51fa\u3066\u304d\u305f\u753b\u9762\u304c\u4ee5\u4e0b\u3067\u3059\u3002\u3053\u306e\u753b\u9762\u3067\u5165\u529b\u3055\u308c\u305f\u6587\u5b57\u3092\u6d88\u3059\u5834\u5408\u306f\u3001\u77e2\u5370\u30ad\u30fc\u3067\u79fb\u52d5\u3057\u3066\u300cx\u300d\u30ad\u30fc\u3067\u524a\u9664\u3002<\/p>\n<p style=\"text-align: left;\"><a href=\"https:\/\/takanix.com\/wp-content\/uploads\/2011\/07\/screenshot21.jpg\"><img loading=\"lazy\" src=\"https:\/\/takanix.com\/wp-content\/uploads\/2011\/07\/screenshot21.jpg\" title=\"screenshot2\" width=\"570\" height=\"733\" class=\"aligncenter size-full wp-image-273\" srcset=\"https:\/\/takanix.com\/wp-content\/uploads\/2011\/07\/screenshot21.jpg 570w, https:\/\/takanix.com\/wp-content\/uploads\/2011\/07\/screenshot21-233x300.jpg 233w\" sizes=\"(max-width: 570px) 100vw, 570px\" \/><\/a><\/p>\n<p style=\"text-align: left;\"><a href=\"https:\/\/takanix.com\/wp-content\/uploads\/2011\/07\/screenshot21.jpg\"><\/a>\u65b0\u898f\u306e\u5834\u5408\u306f\u3001\u4f55\u3082\u5165\u529b\u3055\u308c\u3066\u3044\u306a\u3044\u306e\u3067\u3001<br \/>\n\u300cesc\u300d\u30ad\u30fc\u3092\u62bc\u3057\u3066\u3001vi\u3092\u5165\u529b\u30e2\u30fc\u30c9\u306b\u5909\u3048\u307e\u3059\u3002\u300cesc\u300d\u62bc\u3059\u3060\u3051\u3067\u3059\u3002<br \/>\n\u633f\u5165\u30b3\u30de\u30f3\u30c9\u300ci\u300d\u3092\u62bc\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u30b3\u30de\u30f3\u30c9\u306a\u306e\u3067\u3001\u5b9f\u969b\u306b\u300ci\u300d\u306f\u5165\u529b\u3055\u308c\u307e\u305b\u3093\u3002<br \/>\n\u305d\u306e\u5f8c\u3001\u4f8b\u3048\u3070\u300c0 0 * * 1 \/usr\/local\/bin\/php \/home\/cs123456789\/test.com\/htdocs\/test\/test.php\u300d\u3068\u30da\u30fc\u30b9\u30c8\u3059\u308c\u3070OK\u3002<br \/>\n\u30da\u30fc\u30b9\u30c8\u306f\u51fa\u6765\u308b\u306e\u3067\u3001\u3042\u3089\u304b\u3058\u3081\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30c3\u30c8\u306a\u3069\u3067\u30b3\u30de\u30f3\u30c9\u3092\u66f8\u3044\u3066\u304a\u304f\u3068\u4fbf\u5229\u3067\u3059\u3002<br \/>\ncron\u306e\u6307\u793a\u306f\u3001\u6539\u884c\u305b\u305a\u306b\u4e00\u884c\u3067\u66f8\u304d\u307e\u3059\u3002\u8907\u6570\u6307\u793a\u304c\u3042\u308b\u5834\u5408\u306f\u30012\u884c\u76ee\u30013\u884c\u76ee\u3068\u66f8\u304d\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left;\">\u4eca\u56de\u3001cron\u306e\u6307\u793a\u306b\u300c\/usr\/local\/bin\/php\u300d\u3068\u5165\u308c\u3066\u3042\u308b\u306e\u306f\u3001\u305d\u306e\u5f8c\u306b\u7d9a\u304f\u300c\/home\/cs123456789\/test.com\/htdocs\/test\/test.php\u300d \u304cPHP\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3060\u304b\u3089\u3067\u3059\u3002<br \/>\n\u6307\u5b9a\u6642\u9593\u306b\u3001\u81ea\u52d5\u3067\u6307\u5b9a\u306e\u30d5\u30a1\u30a4\u30eb\u306ePHP\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3068\u3044\u3046\u4e8b\u3067\u3059\u3002<br \/>\n\u203b\u6307\u793a\u306f\u3001\u5fc5\u305a\u534a\u89d2\u30b9\u30da\u30fc\u30b9\u3067\u533a\u5207\u3063\u3066\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<p style=\"text-align: left;\">\u5165\u529b\u304c\u7d42\u308f\u3063\u305f\u3089\u3001\u518d\u5ea6\u300cesc\u300d\u3092\u62bc\u3057\u3001\u30b3\u30de\u30f3\u30c9\u30e2\u30fc\u30c9\u306b\u623b\u3057\u3001\u300c:w\u300d\u3067\u4fdd\u5b58\u3002\u300c:q\u300d\u3067vi\u3092\u7d42\u4e86\u3067\u3059\u3002<br \/>\n\u3061\u306a\u307f\u306b\u3001\u4fdd\u5b58\u305b\u305a\u623b\u308a\u305f\u3044\u5834\u5408\u306f\u3001\u300c:q!\u300d\u3068\u62bc\u305b\u3070\u826f\u3044\u3067\u3059\u3002<br \/>\n\u5165\u529b\u3057\u3066\u3044\u308b\u6642\u306b\u9593\u9055\u3048\u305f\u3089\u3001\u4e00\u65e6\u300cesc\u300d\u3067\u30b3\u30de\u30f3\u30c9\u30e2\u30fc\u30c9\u306b\u623b\u308b\u300cx\u300d\u3092\u62bc\u3057\u3001\u307e\u305f\u300cesc\u300d\u3092\u62bc\u3057\u5165\u529b\u30e2\u30fc\u30c9\u306b\u623b\u3063\u3066\u4e0b\u3055\u3044\u306d\u3002<\/p>\n<p style=\"text-align: left;\">\u7d42\u308f\u3063\u305f\u3089\u3001\u78ba\u8a8d\u306e\u305f\u3081\u3001\u300ccrontab -l\u300d\u3067\u78ba\u8a8d\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<p style=\"text-align: left;\">\uff14\uff09\u6700\u5f8c\u306b\u3001cron\u306e\u66f8\u304d\u65b9\u3067\u3059\u3002<\/p>\n<p style=\"text-align: left;\">\u4e0a\u8a18\uff13\uff09\u3092\u30b5\u30f3\u30d7\u30eb\u306b\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left;\">*\u25a1*\u25a1*\u25a1*\u25a1*\u25a1\/usr\/local\/bin\/php\u25a1\/home\/cs123456789\/test.com\/htdocs\/test\/test.php<br \/>\n\u203b\u25a1\u306f\u3001\u534a\u89d2\u30b9\u30da\u30fc\u30b9\u306e\u610f\u5473\u3067\u3059\u3002<\/p>\n<p style=\"text-align: left;\">\u6700\u521d\u306e\uff15\u3064\u306e\u300c*\u300d\u3092\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002<br \/>\n\uff15\u3064\u306e\u300c*\u300d\u306f\u5de6\u304b\u3089\uff11\u3064\u305a\u3064\u610f\u5473\u304c\u3042\u308a\u3001<br \/>\n\u5206(0-59)\u3000\u6642(1-24)\u3000\u65e5(1-31)\u3000\u6708(1-12)\u3000\u66dc\u65e5(0-7)\u3000\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left;\">30 9\u00a0*\u00a0*\u00a0*\u3000\u30679\u6642\u534a\u306b\u5b9f\u884c<br \/>\n*\/3\u00a0*\u00a0*\u00a0*\u00a0*\u3000\u30673\u5206\u304a\u304d\u306b\u5b9f\u884c<br \/>\n0 *\/1\u00a0*\u00a0*\u00a0*\u00a0\u3000\u30671\u6642\u9593\u304a\u304d\u306b\u5b9f\u884c<br \/>\n0 0 * * 1\u3000\u3067\u6708\u66dc\u65e5\u306e0\u66420\u5206\u306b\u5b9f\u884c<\/p>\n<p style=\"text-align: left;\">\u306a\u3069\u306a\u3069<\/p>\n<p style=\"text-align: left;\">\u30bf\u30fc\u30df\u30ca\u30eb\u306f\u3001\u6700\u5f8c\u300cexit\u300d\u3068\u5165\u529b\u3057\u7d42\u4e86\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<p style=\"text-align: center;\">&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7d50\u69cb\u3001cron\u3068\u3044\u3046\u304bSSH\u3067\u306e\u8a2d\u5b9a\u306f\u5acc\u3067\u3059\u306d\u3002 \u81ea\u793e\u30b5\u30fc\u30d0\u30fc\u306a\u3089\u307e\u3060\u3044\u3044\u3051\u3069\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30b5\u30fc\u30d0\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\u306e\u306f\u7d50\u69cb\u6c17\u3092\u3064\u3051\u308b\u3057\u75b2\u308c\u307e\u3059\u3002 \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30b5\u30fc\u30d0\u30fc\u300cDrive Network\uff08\u30c9\u30e9\u30a4\u30d6\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\uff09\u300d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":""},"categories":[78,1],"tags":[122,123,604,124],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/takanix.com\/index.php?rest_route=\/wp\/v2\/posts\/267"}],"collection":[{"href":"https:\/\/takanix.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/takanix.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/takanix.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/takanix.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=267"}],"version-history":[{"count":5,"href":"https:\/\/takanix.com\/index.php?rest_route=\/wp\/v2\/posts\/267\/revisions"}],"predecessor-version":[{"id":287,"href":"https:\/\/takanix.com\/index.php?rest_route=\/wp\/v2\/posts\/267\/revisions\/287"}],"wp:attachment":[{"href":"https:\/\/takanix.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/takanix.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/takanix.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}