Where is the cron job file/s?

I know that there are several cron files in /etc/, however, none of the cron jobs I have added are there.

Where would the file/s be?

Closed (fixed)


I hope it is allowed for non-Pro-users to barge in here and post replies to support requests... If not, please let me know, and I apologize and will of course stop it.

To answer the question: On my system, cron files are, in addition to /etc/cron.*, located in /var/spool/cron/crontabs/{username}. Maybe you find there what you're looking for.

Joe's picture
Submitted by Joe on Thu, 10/21/2010 - 05:16 Pro Licensee

Replies are always welcome everywhere, Locutus. ;-)

In this case, you're right for Debian/Ubuntu, but slightly off for CentOS.

On CentOS, the user and root crontabs are in /var/spool/cron/username

Note that this is all standard stuff. Virtualmin creates cronjobs via the Webmin cron module, which creates cronjobs wherever it is configured to create them...which, by default, is wherever your OS puts them (as with nearly everything in a Virtualmin/Webmin system, we try really hard to do things the "standard" way, whatever standard that happens to be for your OS).

I am sure that any answers/responses are appreciated, regardless of status!

I just found them, as I received your response notification!



FYI, on my system, they in a straight /var/spool/cron in a file called 'root', which is the main user name!

This now leads to a different issue, which I will create another thread for!

Thanks Joe! :)

Another notice about the files in /var/spool/cron: At least on Ubuntu they are not recommended to be edited directly.

In addition to using Webmin, which of course also does that job just fine, you could use the shell command crontab -e which will fire up a selectable editor to make changes to the user-level cron file.

And yep, the files in /var/spool are named after the user for which the files are created, and under whose account the commands there will get executed.

Yes, the location varies based on the linux distribution. If you edit them directly (not recommended), you will need to restart crond for the change to take effect.

I will close this bug, as it looks like the question has been answered.

Automatically closed -- issue fixed for 2 weeks with no activity.