What command used to edit Crontab in cPanel and Plesk on linux ?

0
1057
Command used to edit Crontab in cPanel and Plesk on Linux

About crontab:

Crontab files used for the automated process. It will process the server or system backup, maintenance, and other tasks. It is like the schedule on windows and used in the Linux Operating system. Cronjob files are created by syntax. It will run automatically at their scheduled time. Here you will see, how to edit the crontab by using the command in cPanel and Plesk on Linux.

By default cron searches in its area /var/spool/cron/ folder(directory) for the crontab file. The cron in its directory is not directly accessed by the user. It is accessible by the sudo users

Syntax of crontab

The syntax is:

Command: 1 1 2 2 5 /root/script.sh

To create and edit cronjobs: crontab -e

To view the crontab files: crontab -l

Directory for personal crontab files:

  1. Mac OS X – /usr/lib/cron/tabs/ for users (/usr/lib/cron/tabs/username).
  2. FreeBSD & OpenBSD & NetBSD – /usr/lib/cron/tabs/ for users (/usr/lib/cron/tabs/username).
  3. Centos & Red Hat / RHEL & Fedora – /var/spool/cron/ for users (/var/spool/cron/username)
  4. Debian & Ubuntu – /var/spool/cron/crontabs/ for users (/var/spool/cron/crontabs/username).

LEAVE A REPLY

Please enter your comment!
Please enter your name here