mercoledì 25 settembre 2019

Linux execute at boot

The common mistake running a script @reboot using crontab is that the script is execute immediately after system is up so network service is not started yet.

a workaround is:
#execute call home at boot
@reboot         root    sleep 120; /devcomm/startup.sh > /devcomm/logs/cronlog 2>&1'








the script itself:

#!/bin/bash
#startup application
cd /devcomm
/usr/bin/python3 call1.py
/usr/bin/python3 call2.py