cron job and running program

Dear experts,
I have this cronjob

 * */2 * * * $path/supervisor.sh 

The supervisor script is checking another script, which initializes the final scripts in multiple directories.

Note that the supervisor script runs without the cronjob.

In each directory, I have the following script:

#!/bin/sh
for i in *_*.py
do
   if [ -f "${i}_DONE" ]
   then
     continue
   else
     mod9.9 $i && touch ${i}_DONE
   fi
done

the problem is that the cronjob is not running, giving an error

./run01.sh: line 8: mod9.9: command not found

note that without the cronjob, the mod9.9 is running fine from the command line.

Any ideas why?

Use full path to the mod9.9 program in your script.

1 Like

thanks Bartus, I thought it is not needed for this specific program. I will start my job again and let you know

Thanks!

---------- Post updated at 11:06 AM ---------- Previous update was at 08:44 AM ----------

nice it is working perfectly!

thanks a lot!