1

I know that there are some cron jobs (run every minute) scheduled in my Ubuntu.

How do I track what's running them, when the cron files (sudo su; crontab -e) are empty?

takeshin
  • 1,471
  • 3
  • 21
  • 28
  • answer from question trail [answer from question trail](https://askubuntu.com/questions/624701/where-are-cron-logs-stored-on-ubuntu-14-04/1384537#1384537) https://askubuntu.com/questions/624701/where-are-cron-logs-stored-on-ubuntu-14-04/1384537#1384537 – Mahesh More Dec 31 '21 at 08:45

3 Answers3

4

Send the cron.* syslog facility to its own file, see How to check cron logs in Ubuntu. Review syslog crontab lines for edits, and the CRON lines for jobs run.

Review the crontab spool for users, the system wide crontab, and the .d directory.

/var/spool/cron
/etc/crontab
/etc/cron.d

The rest of the cron directories contain just scripts to run on the specified interval. These won't contain something run every minute.

/etc/cron.hourly
/etc/cron.monthly
/etc/cron.weekly
/etc/cron.daily
John Mahowald
  • 32,050
  • 2
  • 19
  • 34
2

Linux allow administrator to check all cron jobs running on the server, since you are running Ubuntu you need to go to /var/spool/cron/crontabs then grep all configured cron to see what job is running every minute grep -r "*/1" *.

Also you need to check if there is a user running a cron job that contains a repetitive condition.

Ahmad Abuhasna
  • 195
  • 1
  • 9
0

#to check all job run timeline

cat /var/log/syslog | grep CRON

#to check each job full log

cd /var/mail/

ll
-rw-rw----  1 ubuntu mail 9342 Dec 31 07:35 ubuntu

less ubuntu

#in the above file you can find the whole log

just shift + g so you can see all new logs text

#to check live file / log update

tail -f /var/mail/ubuntu