'cron'에 해당되는 글 1건

[[ blog 이사 과정에서 정확한 posting날짜가 분실됨. 년도와 분기 정도는 맞지 않을까? ]]

Sometimes, script that works well in command shell, doesn't work correctly in 'cron'.
In this case, following should be checked firstly.

'cron' uses initial environment varialbe. And in this case, '/bin/sh' is used as a shell.
In case of some high-version-ubuntu, '/bin/sh' is not 'bash' but 'dash'. And this can be root cause of this issue.
To avoid this, we should always add "#!/bin/bash" at the top of bash script, habitually.

블로그 이미지


Tag ,

댓글을 달아 주세요