A crontab is a file that holds the instructions for the cron daemon.
Each cronjob within the crontab will run a specific command at a specific time based on the crontab configuration.
crontab <filename>: command to run cron-jobs within a separate file as an argument
crontab -e: edit current user’s crontab
crontab -l: list current user’s crontab
crontab -r: delete user’s crontab
crontab -i: prompt before deleting user’s crontab
View the crontab file with the follwing command:
The default user crontab seen from the previous command will look similar to the above screenshot.
The global crontab config file can be viewed with the following command:
sudo vim /etc/crontab
In addition to the five time parameters, and command to execute, the global crontab config file requires the user that will execute the command
* * * * * user-name command-to-run
The file was opened with
vim and can be closed with