Ask Your Question
0

fedora 16 having problems with crontab

asked 2012-06-11 15:02:22 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Hi everyone, I write you because I have a problem and I just don't know what else to try. I'm running a cron job in Fedora 16, the scripts are in Matlab language and I'm calling them from a bash script. The problem is that it doesn't work by itself, I mean, I run it from the terminal and it works fine and (it must generate files and save them) the files are all there. But, when I set crontab to do the same on its own, it doesn't generate the files (or maybe it does but it never saves these files). I know the script does something because it generates the folder with the date (that order is inside the same Matlab script that has to generate the files). I use this line to call it from the bash file:

/usr/local/bin/matlab -nodisplay -nojvm -r "run /home/myuser/myscript.m; quit"

The funniest thing is that I tried these scripts in my old Fedora 14 and it works perfect!!! (this is not the first thing I find that works in Fedora 14 and not in Fedora 16, is it really improving?)

Any help you can give I say thanks! Laura

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-06-14 11:31:24 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

This is probably a problem with the environment and/or the PATH. cron jobs do not have the same settings as those you run from the command line. You need to stick some

2> /home/YOUR_LOGIN/debug

into your scripts to find what's going wrong.

Do you know cron mails you/root about errors?

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-06-11 15:02:22 -0500

Seen: 513 times

Last updated: Jun 14 '12