Chapter 6. Automating Tasks with Scripts
This chapter shows how to automate various tasks using scripts.
The topics covered in this chapter are as follows:
- How to create a script to automate a task.
- The proper way to use cron to run the script automatically at specific times.
- How to use
ZIPandTARto perform compressed backups. - Source code examples.
The reader will learn how to create automated scripts.
We talked about the sleep command in Chapter 3, Using Loops and the sleep Command. It can be used to create an automated script (that is, one that runs at a specific time with no user intervention) as long as a few guidelines are followed.
This very simple script will reinforce what we covered in Chapter 3 Using Loops and the sleep Command about using the sleep command for automation:
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime