There are many tasks that a server can perform automatically such as running scripts and commands. On a Linux server, the cron utility is used to schedule scripts and commands.
LIst of Cron jobs are typically located in the spool directories. They are stored in tables called crontabs. You can find them at /var/spool/cron/crontabs. The tables contain the cron jobs for all users, except the root user.
The root user can use the crontab for the whole system.
In the given article, we will discuss several options to view current cron jobs scheduled in the crontab list.
Following are the Prerequisites to view all jobs in Cron/Crontab
- A root account or user account with sudo privileges
- Access to a terminal window (Ctrl+Alt+T) or command line (Ctrl+Alt+F2)
How to List Jobs in Crontab?
To view Root’s Cron Jobs
View a User’s Cron Jobs
crontab -u username -l
View Daily Cron Jobs
View all the daily cron jobs:
ls -la /etc/cron.daily/
View a specific daily cron job:
View Hourly Cron Jobs
First view all the hourly cron jobs:
ls -la /etc/cron.hourly/
Then view a specific hourly cron job:
View Weekly Cron Jobs
Display All Jobs in Cron
ls -la /etc/cron.weekly/
Then view a specific weekly cron job:
View Monthly Cron Jobs
First view all the monthly cron jobs:
ls -la /etc/cron.monthly/
Then view a specific monthly cron job:
To view software specefic cron tasks, start by viewing a list of cron tasks:
cd /etc/cron/daily ls –l
Use the cat command to display the contents of update-notifier-common:
Now you must have understood how to navigate through the cron jobs on your server. Have other thoughts or questions? Reach out to us, our expert support is available 24*7 by phone or mail.
You can also open a chat with us and we’ll be happy to answer any questions you may have!