O'Reilly logo

Linux Shell Scripting Essentials by Sinny Kumari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing the crontab entry

We don't add or modify an entry of a crontab directly. It is done by using the crontab command that allows you to add, modify, and list crontab entries. Each user can have their own crontab where they can add, delete, or modify tasks. By default, it is enabled for all users, but if a system administrator wants to restrict some of the users, he or she can add that user in the /etc/cron.deny file.

The syntax of using the crontab command is as follows:

crontab [-u user] file
crontab [-u user] [option]

The options of the crontab are explained in the following table:

Option

Description

-u user

Appends the name of the user whose crontab is to be modified

-l

Displays the current crontab on stdout

-e

Edit the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required