Page 1 of 1

Where can i find my cronjobs?

Posted: Sun Mar 17, 2019 8:48 am
by Richard001
Hi,

my raspberry crashed and i have to re-install raspbian. i've created some cronjobs with

Code: Select all

crontab -e
that should executed after reboot or at a specific time. where can i find them when the system don't start? they are not saved i /var/spool/cron. here i only have a sub-folder called 'crontabs'. but i can cd in that folder. there are some sub-folders in /etc (cron.d and cron.daily) but that are not my cronjobs. i have created them without root and writing in /etc needs root.

so where are my cronjobs saved? they must be saved somewhere.

richard

Re: Where can i find my cronjobs?

Posted: Sun Mar 17, 2019 11:46 am
by thagrol
Try /var/spool/cron/crontabs/ though you'll probbaly need sudo to access it (or br logged in as root)

Re: Where can i find my cronjobs?

Posted: Sun Mar 17, 2019 3:11 pm
by davesteele
As thagrol says, it is in /var/spool/cron/crontabs.

But I suspect you are asking the wrong question. You don't really need to know where the file is, you can edit it with "crontab -e".

And it sounds like your real problem is running with the right privileges. For that, you'll want to use one of the cron files in /etc/cron*. Note that there is a slight difference in file format - there is an entry for the user to run as.