I've created a cron job and it does seem to be running. This is the line I've put in cron file :
@reboot python /home/pi/Pimoroni/bme680/Indoor-Air-Quality-MQTT.py &
I ran the command grep CRON /var/log/syslog
to get the list of cron tasks :
Dec 6 13:24:54 TBHPowerPaintPlant cron[327]: (CRON) INFO (pidfile fd = 3)
Dec 6 13:24:54 TBHPowerPaintPlant cron[327]: (CRON) INFO (Running @reboot jobs)
Dec 6 13:24:54 TBHPowerPaintPlant CRON[380]: (root) CMD (python /home/pi/Pimoroni/bme680/Indoor-Air-Quality-MQTT.py &)
The script itself contains a line to log to a file when it first runs and this log file is also empty. The script runs fine from the command prompt using python /home/pi/Pimoroni/bme680/Indoor-Air-Quality-MQTT.py
Can anyone tell me what I need to do to this script to run on boot up?
Thanks