'Autorun C++ exe with crontab on boot

I have created crontab file using the following command.

crontab -e

Then in crontab file

@reboot sleep 120 && /home/xavier/run.sh

run.sh file has

#crontab -e
SHELL=/bin/bash
PATH=/bin:/sbin/:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin

cd /opt/nvidia/deepstream/deepstream-6.0/sources/apps/sample_apps/deepstream-app 
./deepstream-app -c ../../../../samples/configs/deepstream-app/stluke_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8_record.txt

deepstream-app program runs after two minutes. But it stops. I can see in systemmonitor. I'm not sure passing arguments to deepstream-app is correct.

On terminal, the following two commands are used to run c++ exe file.

cd /opt/nvidia/deepstream/deepstream-6.0/sources/apps/sample_apps/deepstream-app 
./deepstream-app -c ../../../../samples/configs/deepstream-app/stluke_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8_record.txt

So I run exactly in shell file. What could be wrong?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source