Submitted by paul.kelly on Thu, 10/21/2010 - 04:28
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?
Status:
Closed (fixed)
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?
Comments
Submitted by Locutus on Thu, 10/21/2010 - 04:52 Comment #1
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.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).
Submitted by paul.kelly on Thu, 10/21/2010 - 05:20 Comment #4
I am sure that any answers/responses are appreciated, regardless of status!
I just found them, as I received your response notification!
thanks,
Paul
Submitted by paul.kelly on Thu, 10/21/2010 - 05:23 Comment #5
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!
Submitted by Locutus on Thu, 10/21/2010 - 05:31 Comment #6
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.
Submitted by JamieCameron on Thu, 10/21/2010 - 10:34 Comment #7
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.
Submitted by Issues on Fri, 11/05/2010 - 20:21 Comment #8
Automatically closed -- issue fixed for 2 weeks with no activity.