Cron / script problem [Solved]

Hello all,

i am facing some issues trying to get cron to run a .sh file (i am running 19.5-Matrix_rc1 on a s905x box, and also tried on an N2+. same results on both boxes)

I use m2strm.exe to convert m3u to strm files with mono addon. i have created two .sh files i want to run in cron

the first grabs the m3u file, and the second converts the m3u to strm files.
i can run each of the .sh files from putty and both of them work fine. but when i try to schedule in cron, only the first file works, and grabs the m3u. the second file to launch m2strm.exe (Convertm3u.sh) does not work.

in the Convertm3u.sh file i have the below content

mono /storage/VOD/m2strm.exe

if i look in ‘09_Journal-cur.log’ i can see cron ran the file, but returned the below error

Jun 25 09:13:00 CoreELECCarla crond[3219]: USER root pid 5489 cmd /storage/VOD/Convertm3u.sh
Jun 25 09:13:00 CoreELECCarla crond[5490]: /storage/VOD/Convertm3u.sh: line 1: mono: command not found

baffled as to what the problem is, as if i run /storage/VOD/Convertm3u.sh from putty, it works just fine.

anyone have any idea as to what i am doing wrong?

UPDATE

fixed it! i needed to use the absolute path for mono in the script when running in cron. i ran ‘which mono’ in putty to get the path and updated my .sh file accordingly, so the content of my Convertm3u.sh file is now as below and working good in cron!

/storage/.kodi/addons/tools.mono/bin/mono /storage/VOD/m2strm.exe

Thanks!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.