The following works on the command line
$ module load something
but fails with  when used in make, bash, etc script files:
> module: command not found
This is because the module enviroment has not been loaded, as it is for a normal user session.
Try using some thing similar to this before your module load call:
module load something