I had the chance to try out these options.
YiFei was right in that the scripts, when invoked by crontab after zsh was activated, were being invoked by sh and that was why the source command was not working.
Using . (dot) would resolve the issue on command line, but I cannot tell jsub to use dot. My current crontab entries look like this:
jsub -N "h" -once -o ~/err/hourly.out -e ~/err/hourly.err ~/grid/jobs/hourly.sh
But neither of these are allowed:
jsub -N "h" -once -o ~/err/hourly.out -e ~/err/hourly.err . ~/grid/jobs/hourly.sh
jsub -N "h" -once -o ~/err/hourly.out -e ~/err/hourly.err ". ~/grid/jobs/hourly.sh"
The first one causes jsub to find two arguments and crash; the second one causes jsub to complain that ". ~/grid/jobs/hourly.sh" is not a program.
Roy Smith offered a trick to explore what environment was used when my script was run. So I create a small script with content "/usr/bin/env > ~/myenv.jsub.txt" and then asked jsub to run it. The job was successfully submitted, but myenv.jsub.txt file remained empty! It is as if no environment was passed, which is confusing.
Anyway, for now, I have given up on `exec zsh` and am going to just invoke zsh manually after I run `become`.