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 - 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Introduction to job scheduling2m
-
(Locked)
One time jobs using at and batch3m 55s
-
(Locked)
About cronjobs3m 5s
-
(Locked)
Recurring user jobs using cron2m 5s
-
(Locked)
Recurring system-wide jobs using cron2m 56s
-
(Locked)
Limit access to AT and cron2m 59s
-
(Locked)
Using systemd timer units3m 44s
-
(Locked)