From the course: Linux: Shells and Processes

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Recurring system-wide jobs using cron

Recurring system-wide jobs using cron - Linux Tutorial

From the course: Linux: Shells and Processes

Recurring system-wide jobs using cron

- [Instructor] A recurring system-wide job is not tied to a user and is run by the operating system. The format of a system cron job is nearly the same as a user cron job. System cron jobs are stored in /etsy/cron.d. To create a cron job, we'll need to create a new cron tab file inside this directory. Since we're creating a system cron job, we'll need to elevate privileges with sudo. In a terminal, type in sudo space vi space/ etc space slash DC slash Chron dot D slash backup docs. You can use another editor like Gietta if you wish. Hit enter, type in your password, and then go into insert mode by pressing the insert key or the I key. Now type in zero space, one space asterisk space, asterisk phase asterisk space root space rsync dash a space slash home slash user one slash documents with the capital D slash space slash home slash user one slash documents with a capital D dot back. This cron job looks very similar to what…

Contents