It's rebooted twice this morning since 8am when the code was first started. Here's my ugly crontab lines (ignorantly overdecorated), the list of the first lines from recent boots, the last twenty of -2 and the last twenty of -1. Nothing that seems Pythony? But I don't really know what to look for.
Code:
pi@pi0w7:~ $ crontab -l | livelines 0 8-20 * * * (pgrep python3 >> /home/pi/pgrep.log 2>&1) || (/home/pi/bin/on > /home/pi/on.log 2>&1 &) &0 21 * * * /home/pi/bin/off &Code:
pi@pi0w7:~ $ for i in `seq -6 1 0`; do journalctl -b $i --no-pager | awk 'NR==1 {print} END {}'; doneNo journal boot entry found for the specified boot (-6).Dec 19 11:52:39 pi0w7 kernel: Booting Linux on physical CPU 0x0Dec 19 14:58:19 pi0w7 kernel: Booting Linux on physical CPU 0x0Dec 19 16:25:31 pi0w7 kernel: Booting Linux on physical CPU 0x0Dec 19 20:22:29 pi0w7 kernel: Booting Linux on physical CPU 0x0Dec 20 08:39:27 pi0w7 kernel: Booting Linux on physical CPU 0x0Dec 20 10:17:03 pi0w7 kernel: Booting Linux on physical CPU 0x0Code:
pi@pi0w7:~ $ journalctl -b -2 --no-pager | tail -n20 Dec 20 07:14:21 pi0w7 systemd[1299]: Listening on ssh-agent.socket - OpenSSH Agent socket.Dec 20 07:14:21 pi0w7 systemd[1299]: Reached target sockets.target - Sockets.Dec 20 07:14:21 pi0w7 systemd[1299]: Reached target basic.target - Basic System.Dec 20 07:14:21 pi0w7 systemd[1]: Started user@1000.service - User Manager for UID 1000.Dec 20 07:14:21 pi0w7 systemd[1299]: Started mpris-proxy.service - Bluetooth mpris proxy.Dec 20 07:14:21 pi0w7 systemd[1299]: Reached target default.target - Main User Target.Dec 20 07:14:21 pi0w7 systemd[1299]: Startup finished in 3.013s.Dec 20 07:14:21 pi0w7 systemd[1]: Started session-14.scope - Session 14 of User pi.Dec 20 07:14:21 pi0w7 systemd[1299]: Created slice session.slice - User Core Session Slice.Dec 20 07:14:21 pi0w7 systemd[1299]: Starting dbus.service - D-Bus User Message Bus...Dec 20 07:14:21 pi0w7 systemd[1299]: Started dbus.service - D-Bus User Message Bus.Dec 20 07:17:01 pi0w7 CRON[1497]: pam_unix(cron:session): session opened for user root(uid=0) by root(uid=0)Dec 20 07:17:01 pi0w7 CRON[1499]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)Dec 20 07:17:01 pi0w7 CRON[1497]: pam_unix(cron:session): session closed for user rootDec 20 08:00:01 pi0w7 CRON[2234]: pam_unix(cron:session): session opened for user pi(uid=1000) by pi(uid=0)Dec 20 08:00:01 pi0w7 CRON[2236]: (pi) CMD ((pgrep python3 >> /home/pi/pgrep.log 2>&1) || (/home/pi/bin/on > /home/pi/on.log 2>&1 &) &)Dec 20 08:00:01 pi0w7 CRON[2234]: pam_unix(cron:session): session closed for user piDec 20 08:17:02 pi0w7 CRON[2348]: pam_unix(cron:session): session opened for user root(uid=0) by root(uid=0)Dec 20 08:17:02 pi0w7 CRON[2350]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)Dec 20 08:17:02 pi0w7 CRON[2348]: pam_unix(cron:session): session closed for user rootCode:
pi@pi0w7:~ $ journalctl -b -1 --no-pager | tail -n20 Dec 20 10:08:57 pi0w7 systemd[969]: Starting ssh-agent.socket - OpenSSH Agent socket...Dec 20 10:08:58 pi0w7 systemd[969]: Listening on dbus.socket - D-Bus User Message Bus Socket.Dec 20 10:08:58 pi0w7 systemd[969]: Listening on gpg-agent-ssh.socket - GnuPG cryptographic agent (ssh-agent emulation).Dec 20 10:08:59 pi0w7 systemd[969]: Listening on gpg-agent.socket - GnuPG cryptographic agent and passphrase cache.Dec 20 10:08:59 pi0w7 systemd[969]: Listening on ssh-agent.socket - OpenSSH Agent socket.Dec 20 10:08:59 pi0w7 systemd[969]: Reached target sockets.target - Sockets.Dec 20 10:08:59 pi0w7 systemd[969]: Reached target basic.target - Basic System.Dec 20 10:08:59 pi0w7 systemd[1]: Started user@1000.service - User Manager for UID 1000.Dec 20 10:08:59 pi0w7 systemd[1]: Started session-4.scope - Session 4 of User pi.Dec 20 10:08:59 pi0w7 systemd[969]: Started mpris-proxy.service - Bluetooth mpris proxy.Dec 20 10:08:59 pi0w7 systemd[969]: Reached target default.target - Main User Target.Dec 20 10:08:59 pi0w7 systemd[969]: Startup finished in 3.723s.Dec 20 10:08:59 pi0w7 systemd[969]: Created slice session.slice - User Core Session Slice.Dec 20 10:08:59 pi0w7 systemd[969]: Starting dbus.service - D-Bus User Message Bus...Dec 20 10:08:59 pi0w7 systemd[969]: Started dbus.service - D-Bus User Message Bus.Dec 20 10:12:26 pi0w7 crontab[1061]: (pi) LIST (pi)Dec 20 10:12:35 pi0w7 crontab[1063]: (pi) LIST (pi)Dec 20 10:17:01 pi0w7 CRON[1122]: pam_unix(cron:session): session opened for user root(uid=0) by root(uid=0)Dec 20 10:17:01 pi0w7 CRON[1124]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)Dec 20 10:17:02 pi0w7 CRON[1122]: pam_unix(cron:session): session closed for user rootCode:
pi@pi0w7:~ $ uptime -s2025-12-20 10:19:54Statistics: Posted by tinker2much — Sat Dec 20, 2025 4:31 pm