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

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…

Contents