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:
- Mac OS X – /usr/lib/cron/tabs/ for users (/usr/lib/cron/tabs/username).
- FreeBSD & OpenBSD & NetBSD – /usr/lib/cron/tabs/ for users (/usr/lib/cron/tabs/username).
- Centos & Red Hat / RHEL & Fedora – /var/spool/cron/ for users (/var/spool/cron/username)
- Debian & Ubuntu – /var/spool/cron/crontabs/ for users (/var/spool/cron/crontabs/username).