Cron job problems: Can't reload '/usr/loca​l/MATLAB/R​2015b/bin/​glnxa64/li​bmwsl_Asyn​cioQueue.s​o'

3 ビュー (過去 30 日間)
I'm running Matlab 2015b on Ubuntu 16.04.3. I've created a bash script for automatically running a code test suite that I intend to run on a nightly basis using cron.
#!/bin/bash
cd ~/data/trunk
svn update
matlab -nodisplay -nosplash -nodesktop -r autoTest
The script runs fine from the command line. However, Matlab exits with error
Can't reload '/usr/local/MATLAB/R2015b/bin/glnxa64/libmwsl_AsyncioQueue.so'
when cron tries to run it. Here's an example of my crontab file:
SHELL=/bin/bash
*/15 * * * * ~/scripts/autoTest.sh > ~/scripts/autoTest.log
(right now I'm running the script every 15 min as part of the debug effort.) Does anyone have any ideas of how to get this script to run under cron? What does libmwsl_AsyncioQueue do, and why would it behave differently under cron?
Thanks!

採用された回答

Walter Roberson
Walter Roberson 2017 年 10 月 16 日
Is it possible that you have set the JAVA* environment variables to point Java to a place other than what MATLAB would expect by default? cron jobs do not go through any login sequence; you might need to set a couple of environment variables in the shell script.
  4 件のコメント
Nathan Fitzgerald
Nathan Fitzgerald 2017 年 10 月 17 日
Looks like the culprit was the USER environment variable. I ended up copying the values for all of my environment variables and pasting them into the crontab. The "Can't Reload" error disappeared at that point. Then I started pruning the number of environment variables until I got down to the subset that still allowed everything to work, which turned out to be just the USER variable.
Walter Roberson
Walter Roberson 2017 年 10 月 17 日
Interesting, I would not have guessed that USER would be the problem. Good tracking effort there.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by