i'm trying to get the startup time of my raspi, the time that i turn it on.
i create this python script called 'boot_time.py'
Code: Select all
from time import strftime
with open("/home/pi/monitor/boot_time.txt", "w") as log:
log.write(strftime("%d-%m-%Y,%H:%M:%S"))
so i created a crontab entry so the script would run on boot
so i executed
Code: Select all
crontab -e
Code: Select all
@reboot python /home/pi/monitor/boot_time.py &
it only works when i reboot the system
hope that one of you guys can help me figure out what's wrong