From the course: Linux: Shells and Processes
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Recurring user jobs using cron - Linux Tutorial
From the course: Linux: Shells and Processes
Recurring user jobs using cron
- [Instructor] Let's start using recurring tasks by talking about user cronjobs. Every user has a crontab file, which is specific to that user. The user crontab file holds the user's cronjobs. They can be managed by a normal user. There's no need to elevate privileges for a user to manage their own cronjobs. The crontab files are stored in /var/spool/cron/username. Let's create a user cronjob. As a normal user, type in crontab space dash e for edit and hit enter. This will bring up the user's crontab file and the default text editor, which will probably be VI. Now let's use the same backup command line that we used in the at service example. Let's have it run the backup once per day at 1:00 a.m. Press i to go into insert mode and then add zero space one, space asterisk, space asterisk, space asterisk, space rsync, space dash a, space Tilda slash documents with the capital D slash, space slash documents with the capital…
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)