28-Sep Friday Fail

28-Sep Friday Fail

Fail 1: The School Run

It's Monday 24th and I've got my Friday Fail already!

Do you remember all the bags you had to bring to primary school? I don't! I'm sure I just had one... Or maybe I only carried one and my mum carried the rest behind me in a walking pile of bags.

I have 2 school aged sons who need multiple bags for school every day, a snack, a bottle of water, uniform, shoes... it's quite the battle getting everything out of the house into the car then into school attached to the right child.

Today I lost the battle. I couldn't find my son's second school shoe, so he went in trainers. Then, I forgot my laptop. Yup, I arrived at work with no computer. Luckily there'a a desktop PC to work on but lots of notes and draft emails were stuck at home on my laptop, sat happily on the sofa waiting for me :D

Fail 2: Cron

I wanted to setup a camera in the loft to take a picture every day of my view. I got the camera setup and working really quickly following this tutorial on the Raspberry Pi website
On this page, I found instruction on how to automate tasks with cron

The instructions were badly worded:
30 * * * * python3 /home/pi/mycoolscript.py
The 30 is telling the script to run every 30 minutes

It's not!! The 30 is telling the script to run 30 minutes past every hour. So it will run at 8.30, 9.30, 10.30.
I was testing my script, it took longer than a minute to run so I wanted it to run every 2 minutes. I thought
2 * * * * python3 /home/pi/mycoolscript.py
would work but in fact it wasn't going to run until 09.02

I spent a very frustrated evening trying different cron commands, entering the full path to the program amnd the file, adding a log file to the end. Nothing worked. I left it running overnight and went to bed. In the morning there were several files:

Top Tip: If something is not working, find another tutorial AND sleeping on it does actually help sometimes!

Related Article