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 |
---|---|
|
Appends the name of the user whose |
|
Displays the current crontab on |
|
Edit the ... |
Get Linux Shell Scripting Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.