There are two lists of scheduled tasks (crontabs).
Each user (including root) has a per-user crontab which they can list with crontab -l
and edit with crontab -e
. The usual Linux implementation of cron stores these files in /var/spool/cron/crontabs
. You shouldn't modify these files directly (run crontab -e
as the user instead), but it's safe to list them to see what's inside. You need to be root to list them.
There is a system crontab as well. This one is maintained by root, and the jobs can run as any user. The system crontab consists of /etc/crontab
and, on many systems, files in /etc/cron.d
. These files have an additional column: after the 5 date/time fields, they have a “user” field, which is the user that the job will run as. It's common to set up /etc/crontab
to run scripts from directories /etc/cron.hourly
, /etc/cron.daily
, etc. and that's how it's done on Raspbian.
So look in all these places: /var/spool/cron/crontabs/*
(you need to be root for this one), /etc/crontab
, /etc/cron.*
.
You can also get information in the system logs. They won't tell you where the job was listed, but they tell you exactly what command is being executed, so you can search for the command text. For example, this is the entry that runs commands in /etc/cron.hourly
every hour:
May 11 07:17:01 darkstar CRON[2480]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)