Is there a way to get cron to run with an updated version of Bash that's been installed?
My OS came with Bash 3.x installed stock and I've upgraded it to 5.x with macports.
When I query bash --version
from a terminal.app window the 5.x version is reported.
If I run the same query from within a cron job: * * * * * /temp/test_bash.sh >> /tmp/test_bash.log 2>&1
the 3.x version which came stock with the OS is reported.
MacOS 10.10.5
bash --version
from terminal, and from cron. In the case of the cron job it's routed to a log file. Updated the post to reflect the logfile part. Please let me know if there are other details you'd find helpful.