Hi Charles,
I assume that you get a "module: command not found" error when the script
is run through the cron.
Initialization of shell session run through cron is minimal. So by default
module command has not been initialized there. One way to make bash
automatically initializes module when it starts is to point to the location
of the module initialization script with the BASH_ENV environment variable.
So I suggest you try to add at the beginning of your crontab:
BASH_ENV=/usr/share/Modules/init/bash
The location depends on where Modules has been installed to. It is
installed in /usr/share/Modules on EL-like Linux distribution.
Regards,
Xavier
Le jeu. 24 mars 2022 à 15:28, Xavier Delaruelle <xav...@gm...>
a écrit :
> Hi Charles,
>
> Could you provide the script you use to reproduce this issue on my side
> (you could send it to me directly if you do not want to post this script on
> the mailing-list).
>
> Regards,
> Xavier
>
> Le jeu. 24 mars 2022 à 14:49, Charles Ross - NOAA Federal via
> Modules-interest <mod...@li...> a écrit :
>
>> Hi all,
>>
>> I hope this isn't too basic of a question.
>>
>> I have a shell script that opens the python module and then executes a
>> python script. Pretty basic and simple, works well.
>>
>> The same script will not work on the cron. It is not able to
>> successfully pass the python version opened through modules.
>>
>> Any help on what to do would be much appreciated,
>>
>> Charles Ross
>>
>>
>> _______________________________________________
>> Modules-interest mailing list
>> Mod...@li...
>> https://lists.sourceforge.net/lists/listinfo/modules-interest
>>
>
|