Dockerコンテナ内の処理を定期的に起動
unix/linuxで定期的に処理を動かしたいときはcrontab使う。 たとえばcrontab.txtとか適当なファイルを作っておく。 左から、「分」「時」「日」「月」「曜日」「コマンド」を書く。 1 2 3 4 5 #daily rm 00 7 * * * /bin/find /gvis/ -name ".*DS_Store" -print -exec rm {} ";" 01 7 * * * /bin/find /gvis/ -name "Thumbs.db" -print -exec rm {} ";" 02 7 * * * /bin/find /nari/ -name ".*DS_Store" -print -exec rm {} ";" 03 7 * * * /bin/find /nari/ -name "Thumbs.db" -print -exec rm {} ";" この定義使うと、Thumbs.db(windowsが勝手に作るファイルね)とDS_Store(macが勝手に作るファイルね)を/nariのディレクトリ以下から探し出して抹消してくれる。 ...