How to Display (List) All Jobs in Cron / Crontab

Servers can automatically perform tasks that you would otherwise have to perform yourself, such as running scripts. On Linux servers, the cron utility is the preferred way to automate the running of scripts.


View Root’s Cron Jobs

crontab -l


View a User’s Cron Jobs

crontab -u username -l


Example with user testuser:

crontab -u testuser -l


View Daily Cron Jobs


First view all the daily cron jobs:

ls -la /etc/cron.daily/


Then view a specific daily cron job:

less /etc/cron.daily/filename


Example with filename logrotate:

less /etc/cron.daily/logrotate


View Hourly Cron Jobs


First view all the hourly cron jobs:

ls -la /etc/cron.hourly/


Then view a specific hourly cron job:

less /etc/cron.hourly/filename


Example with filename 0anacron:

less /etc/cron.hourly/0anacron


View Weekly Cron Jobs


First view all the weekly cron jobs:

ls -la /etc/cron.weekly/


Then view a specific weekly cron job:

less /etc/cron.weekly/filename


Example with filename weeklyexample:

less /etc/cron.weekly/weeklyexample

View Monthly Cron Jobs


First view all the monthly cron jobs:

ls -la /etc/cron.monthly/


Then view a specific monthly cron job:

less /etc/cron.monthly/filename


Example with filename readahead-monthly.cron:

less /etc/cron.monthly/readahead-monthly.cron

View /etc/crontab

less /etc/crontab


Example Result:

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# For details see man 4 crontabs

# Example of job definition:
# .—————- 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

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Check the glibc (GNU libc) Version on CentOS 6 and CentOS 7

Using ldd ldd --version This should return a result similar to: ldd (GNU libc) 2.17Copyright...

Disabling Root User Login

Another security measure you can take to lock down a Linux server is to disable the root user...

How to Install and Configure phpMyAdmin on Ubuntu 14.04

phpMyAdmin is an open source tool used for the administration of MySQL. In addition to offering...

How to Install Logwatch on CentOS 6

Logwatch is a Perl-based log management tool for analyzing, summarizing, and reporting on a...

Using Telnet To Check SMTP Service

One of the most common e-mail issues we encounter in our support department is customers who are...

Powered by WHMCompleteSolution