I'm trying to hunt down a cron job (or the equivalent) which I know is running, but I can't find it in the default cron files for my system (FreeBSD / Linux / BSD). How can I tell which ones are actually being initialized?
2 Answers
crontab can be used to override the files that are used by default. As such you can remove and add your own cron lists, or just single cron jobs.
crontab -l
That will list the cron jobs/lists/tabs that are currently initialized, their frequency, directory and file location, and a few other small details.
Also in FreeBSD you can look in /var/cron/tabs
and for Ubuntu/Linux look in /var/spool/cron/crontabs
for user-specific crontabs.
Linux based distributions can also use various multiple locations for crontabs:
/etc/cron.d/
/etc/cron.daily/
/etc/cron.hourly/
/etc/cron.monthly/
/etc/crontab
/etc/cron.weekly/