Created
December 13, 2013 05:02
-
-
Save satomixx/7939991 to your computer and use it in GitHub Desktop.
月末にだけcronでbatchを叩きたい場合 && /dev/null や 2>&1 について ref: http://qiita.com/mugyuu/items/f835b42ab45ff6246039
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 23 28-31 * * /usr/bin/test $( date -d '+1 day' +\%d ) -eq 1 && perl /getsumatsu_batch.pl > /dev/null 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 時間指定(28日から31日の23時55分) ⇒ なので実際には月末以外にも動いてはいます | |
55 23 28-31 * * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/bin/test {hoge} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/bin/test $( date -d '+1 day' +\%d ) -eq 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$( date -d '+1 day' +\%d ) -eq 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A && B |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl /getsumatsu_batch.pl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% ls >/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment