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?
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?
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
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.
*/1 is not necessary, * in the first column of a crontab runs every minute of the hour.
– John Mahowald
Oct 14 '18 at 14:42
#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