8
7

More than 5 years have passed since last update.

お手軽にバッチ処理の二重起動を防ぐ方法

Last updated at Posted at 2014-03-08

setlockコマンドが使える環境ならこんな感じにします。

setlock -nx demo.lock demo.sh

demo.lockというファイルが作られるが、存在チェックではなく、ロックできるかどうかを調べているので残っていても問題ないです。

参考

8
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
7