Crontab to start Bridge

Hello.

I install the node-flower-bridge like it is discribed in the README. The Bridge also starts working when I change the diectory and start it manually (with sudo).

cd /home/osmc/node-flower-bridge
sudo ./bridge display 15

Without sudo I Get an error message:
"-- Flower Bridge –

/home/osmc/node-flower-bridge/node_modules/nedb/lib/datastore.js:77
if (err) { throw err; }
^

Error: EACCES: permission denied, open 'database/process.db’
at Error (native)"

I also get an error when I trying to start the bridge without the Directory chanceing at the beginning:
"-- Flower Bridge –

module.js:339
throw err;
^

Error: Cannot find module '/home/osmc/start.js’
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Function.Module.runMain (module.js:467:10)
at startup (node.js:134:18)
at node.js:961:3"

For me its no problem to start it with the manually way with directory changeing an the starting the bridge.

But now i want it to start it automatically with crontab or in another way. But every way i try, nothing wirks for me :frowning:
I tries with the sudo crontab -e or with the normal crontab. I’ve made a seperate bash script:
“sleep 20
cd /home/osmc/node-flower-bridge”
./bridge display 20 >> blumen.log"

but it also dont wok in the crontab. When I start the Script over ssh it works and the bridge sync’s.

So Please, Could somebody help me?

My system is a Raspberry Pi 2B with OSMC Mediacenter (Version mai 2016)

I am facing the same issue. I have another thread open here regarding it.
here is what the developer came back with but i have not been able to get it to work

   BrunoSautron21d
    Hi @tinke3433

    You can add a cron job to start the bridge like:
   $> crontab -e
   and add:
   */1 * * * * /home/pi/node-flower-bridge/bridge background

   This job try to start the program every minute. ./bridge background command start the program only if the 
   bridge is not on.
   So every minute it will check if the program is alive. If is not, it start the program.

   The crontab is permanent also a reboot of the raspberry.

   Bruno