← Shell Scripting (Bash) learning pathShell Scripting (Bash) · Module 9 of 10
Automation and scheduling
Automate backups, logs and tasks.
📖 Key ideas
- cron schedules scripts: crontab -e.
- Cron syntax: minute hour day month weekday command.
- Example: 0 2 * * * /home/u/backup.sh runs daily at 2 AM.
- tar -czf backup.tar.gz folder compresses folders.
- Log script output and exit codes.
💡 Real-life example: cron is an alarm clock that runs your scripts while you sleep.
cronTime-based job scheduler
crontab -eEdits scheduled jobs
tar -czfCreates gzip archive
rsyncEfficient file sync tool