The tool in question is called cron and it allows you to schedule jobs for the Linux operating system. Also: Patch now: Serious Linux security hole uncovered Say, for example, you’ve written a simple backup script to back up everything in your Documents folder. It’s named backup.sh and looks something like this: You save that script in /usr/local/bin and give it the proper execution permissions with the command: Now, instead of running that backup script manually every day or week, you can use cron to make it automatic. Let me show you how.

How to create a cron job

If this is the first time you’ve issued the crontab -e command, you’ll need to select your default editor. I would suggest going with nano, as that’s the easiest Linux text editor to use. What is the > /dev/null 2>&1 portion of the entry? Simply put, if there’s any output from the script, it must be suppressed; otherwise it could cause errors. For that, we use the > to send all output to /dev/null (which a like a system trash can) and then instructs cron where to send all errors with 2>&1. The complete cron entry for a Saturday 11:59 PM run would look like this: Save and close the file with Ctrl+X. Once you’ve saved the crontab file, the job is ready and will be run at the configured time. Before the first run of the job, you might want to test the script to make sure it completes without errors, which can be done with the command backup.sh.  And that’s what cron does for you and how you can easily use it to automate scripts you’ve written for the Linux operating system.