I have written a Python script and scheduled it to run @reboot using cronjob. Sometimes this script throws an exception sometimes it works perfectly. I want to write test scripts for this.
Preferably, rebooting Pi 10 times and logging all the output in a log file. I have tried running a bash script, but it resets to zero after pi reboot for the first time.