From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 1 Deploy, Configure, and Manage (2021)
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Manage reccuring system jobs with cron
From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 1 Deploy, Configure, and Manage (2021)
Manage reccuring system jobs with cron
- [Instructor] A recurring system task is not tied to a user and is run by the operating system. The format of a system cron job is the same as a user cron job. System cron jobs are stored in /etc/cron.d. To create a cron job we'll need to create a new file inside of this directory. Since we're creating a system cron job we'll need to elevate privileges with sudo. In a terminal type in sudo vi /etc/cron.d/backupdocs and hit enter. Go into insert mode by pressing the I key and then add in 0 1 * * * root rsync -a /home/user1/Documents/ /home/user1/Documents.bak. This cron job looks very similar to a user cron job with a couple of differences. After the time specification we've included a user to run this as. In this case, the user is root. We've also included absolute paths for the source and destination files to ensure the correct files get copied. Any user can be specified to run system cron jobs. If you use a normal…
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)
Understand the Linux boot process2m
-
(Locked)
Boot into the emergency target5m 54s
-
(Locked)
Introduction to systemd services2m 32s
-
(Locked)
Get systemd service status3m 56s
-
(Locked)
Manage systemd services2m 33s
-
(Locked)
Make systemd services persistent1m 40s
-
(Locked)
Configure networking4m 41s
-
(Locked)
Configure a system to use network time protocol4m 9s
-
(Locked)
Manage one-time jobs with AT4m 4s
-
(Locked)
Manage reccuring user jobs with cron5m 2s
-
(Locked)
Manage reccuring system jobs with cron2m 41s
-
(Locked)
Limiting access to AT and cron3m 41s
-
(Locked)
-
-
-