systemctl status crond.service Check is Cron service is running on CentOS 7
systemctl enable cron.service Enable Cron service on CentOS 7
systemctl start cron.service Start Cron service on CentOS 7
crontab -l Root's cron jobs
crontab -u username -l User's corn jobs
EDITOR=nano crontab -e Edit the cron job using nano

 

Example of a Cron Job file

#----------------------------------------------------------------------------- 
# example unix/linux crontab file format: 
#----------------------------------------------------------------------------- 
#
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name  command to be executed
#-----------------------------------------------------------------------------

MAILTO=info@johnleger.com 

# JohnLeger.us cron job to delete backups older than 30 days 
* 3 * *6 find /var/www/vhosts/johnleger.us/backups/daily -type f -iname '*.tar.gz' -mtime +30 -delete 
15 3 * *6 find /var/www/vhosts/johnleger.us/backups/mysql -type f -iname '*.tar.gz' -mtime +30 -delete

# JohnLeger.us cron job to update files and db every Saturday 
30 3 * * 6 /bin/tar -czvpf /var/www/vhosts/johnleger.us/backups/daily/`date +\%y\%m\%d`_johnleger.us_backup.tar.gz /var/www/vhosts/johnleger.us/public_html 
30 4 * * 6 /usr/bin/mysqldump johnleger -u jlbackup -p43yCORElKt1Dk25l | /bin/gzip > /var/www/vhosts/johnleger.us/backups/mysql/`date +\%y\%m\%d`_johnleger.us_backup.sql.gz