How to View Jobs in Crontab

Sonu Thakur
Engineering @ Housing/Proptiger/Makaan
1 min readJun 1, 2023

To view Root’s cron jobs.

crontab -l

View a user’s cron jobs.

crontab -u username -l

Example with user sonu.

crontab -u sonu -l

View Daily Cron Jobs

View all the daily cron jobs.

ls -la /etc/cron.daily/

View a specific daily cron job.

less /etc/cron.daily/filename

Example with file name 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 file name data_sync.

less /etc/cron.hourly/data_sysc

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 the file name disk_cleanup.

less /etc/cron.weekly/disk_cleanup

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 file name backup-monthly.cron.

less /etc/cron.monthly/backup-monthly.cron

View /etc/crontab

less /etc/crontab

Example result.

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# 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

_________________________________________________________________

— — — — — — — — — — Thank you for reading my blog — — — — — — — — —

--

--