Set up a cron job on a computer or Raspberry Pi to run a simple script that displays a reminder message every day.



Step-by-step guide to set up a cron job to display a daily reminder
Understanding Cron Jobs: Scheduling Tasks for Specific Days and Times
Step 1
Open the terminal app on your computer or Raspberry Pi so you can type commands.
Step 2
Create a new script file by typing nano ~/daily_reminder.sh and pressing Enter.
Step 3
Inside the editor type these exact lines then save and exit: #!/bin/bash then notify-send "Reminder" "Time to water the plants!" then echo "$(date): Time to water the plants!" >> $HOME/reminder_log.txt
Step 4
Make the script able to run by typing chmod +x ~/daily_reminder.sh and pressing Enter.
Step 5
Test the script by running ~/daily_reminder.sh in the terminal and watching for a popup or a new line added to reminder_log.txt.
Step 6
If you did not see a popup ask an adult to help install the popup tool by running sudo apt-get update then sudo apt-get install -y libnotify-bin.
Step 7
Open your crontab editor by typing crontab -e and pressing Enter.
Step 8
Add this one line to the crontab then save and exit, replacing yourusername with your account name: 0 9 * * * DISPLAY=:0 XAUTHORITY=/home/yourusername/.Xauthority /home/yourusername/daily_reminder.sh >> /home/yourusername/cron_debug.log 2>&1
Step 9
Share a photo or description of your working reminder on DIY.org so everyone can see your cool cron job creation.
Help!?
What can I use instead of notify-send or libnotify-bin if they are not available?
If notify-send or libnotify-bin isn't available you can replace the notify-send line in ~/daily_reminder.sh with a zenity --info command or rely on the echo line that writes to $HOME/reminder_log.txt so the cron job still logs reminders.
My cron job didn't show a popup—what should I check to fix it?
If you didn't see a popup or a new line, first run ~/daily_reminder.sh manually to confirm the script works, ensure you ran chmod +x ~/daily_reminder.sh, verify you replaced yourusername in the crontab line and included DISPLAY=:0 and XAUTHORITY=/home/yourusername/.Xauthority, then inspect /home/yourusername/cron_debug.log for errors.
How can this activity be modified for younger or older kids?
For younger kids have an adult create the file nano ~/daily_reminder.sh and add the crontab line while the child tests ~/daily_reminder.sh and takes a photo to share, and for older kids let them edit the notify-send message, change the crontab schedule, or add extra echo lines to $HOME/reminder_log.txt.
How can we extend or personalize the reminder script or cron schedule?
To personalize it, edit ~/daily_reminder.sh to include multiple notify-send messages, a zenity checklist, or sound playback, change the time fields in your crontab entry to run at different times, and keep watching /home/yourusername/cron_debug.log and $HOME/reminder_log.txt for results.
Watch videos on how to set up a cron job to display a daily reminder
Linux Crash Course - Scheduling Tasks with Cron
Facts about cron and task scheduling for kids
⏰ Cron is like an alarm clock for your computer — it automatically runs tasks at the times you schedule.
🐧 The Raspberry Pi is a tiny, affordable computer popular with makers and learners for projects and coding.
💡 A shell script is just a plain text file with commands — write it once and run many reminders with a click.
🔁 Cron schedules use five fields (minute, hour, day, month, weekday) so you can run jobs every minute, daily, or only on certain days.
⚡ Cron jobs only run while the computer is powered on — a always-on Raspberry Pi can remind you every day reliably.