cron runs commands automatically on a schedule, for example a nightly backup.
1. Edit your schedule: crontab -e (choose nano if asked).
2. Add a line in this format: minute hour day month weekday command
Examples:
0 2 * * * /home/user/backup.sh: every day at 2:00 AM
30 18 * * 5 /home/user/report.sh: every Friday at 6:30 PM
3. Save and exit (in nano: Ctrl and O, Enter, Ctrl and X).
4. See your schedule: crontab -l
Use full paths to scripts and programs, and make scripts executable with chmod +x.