月末だけcronで処理をさせたい時。
月末(28日~31日)の24時ちょい前に、翌日の日付が 1 の場合に実行すれば良さげ。
下記のような感じでできる。
59 23 28-31 * * /usr/bin/test `date -d tomorrow +\%d` -eq 1 && /path/to/script
月末だけcronで処理をさせたい時。
月末(28日~31日)の24時ちょい前に、翌日の日付が 1 の場合に実行すれば良さげ。
下記のような感じでできる。
59 23 28-31 * * /usr/bin/test `date -d tomorrow +\%d` -eq 1 && /path/to/script