crontool
Paste a schedule, read it in English, see the next runs.

Schedule a Cron Job on Raspberry Pi

Raspberry Pi OS is Debian-based, so cron works exactly as on any Linux. Use crontab -e, give absolute paths, and add a startup delay for @reboot jobs that touch hardware or the network.

The crontab line

crontab -e then add */5 * * * * /usr/bin/python3 /home/pi/sensor.py >> /home/pi/sensor.log 2>&1 to read a sensor every 5 minutes. Always use /usr/bin/python3, not bare python.

@reboot needs a delay

GPIO and network aren't ready the instant cron starts. Use @reboot sleep 30 && /usr/bin/python3 /home/pi/startup.py so hardware is initialised first.

Run as root for hardware

Some GPIO libraries need root. Use sudo crontab -e for those jobs, but keep non-hardware jobs in the normal user crontab.

FAQ

How do I add a cron job on Raspberry Pi?

Run crontab -e and add your schedule line, e.g. */5 * * * * /usr/bin/python3 /home/pi/sensor.py. Raspberry Pi OS uses standard Linux cron.

Why does my @reboot cron job fail on the Pi?

Hardware and network aren't ready at boot. Add a delay: @reboot sleep 30 && /usr/bin/python3 /home/pi/startup.py.

Do I need sudo for a Raspberry Pi cron job?

Only if it uses GPIO libraries that require root. Use sudo crontab -e for those; keep other jobs in the normal user crontab.