Where are users' cron jobs stored?

casey

Well-Known Member
Jan 17, 2003
2,288
0
191
I know it's probably right under my nose, but I can't seem to locate user cron jobs...What are they named?

cPanel.net Support Ticket Number:
 

jackal

Well-Known Member
PartnerNOC
Feb 23, 2002
707
0
316
/var/spool/cron/

cPanel.net Support Ticket Number:
 

Website Rob

Well-Known Member
Mar 23, 2002
1,501
1
318
Alberta, Canada
cPanel Access Level
Root Administrator
Any idea why the big notice:

# DO NOT EDIT THIS FILE - edit the master and reinstall.

Would seem to makes things easier by editting there, than to have to find the "master" file.

cPanel.net Support Ticket Number:
 

casey

Well-Known Member
Jan 17, 2003
2,288
0
191
Originally posted by Website Rob
Any idea why the big notice:

# DO NOT EDIT THIS FILE - edit the master and reinstall.

Would seem to makes things easier by editting there, than to have to find the "master" file.

cPanel.net Support Ticket Number:
Yeah, exactly. If you even pico the thing it breaks, and you have to set up everything again. I want to see what cron jobs my users have set up, but if I pico the ones in /var/spool/cron everything gets deleted. Mind you now, I'm not editing anything just opening and closing. So I'd like to be able to just look at the things.:(

I guess I can just look in /var/spool/cron to see which users have cron jobs and then go to each user's cpanel individually....:(

cPanel.net Support Ticket Number:
 

rsferreira

Member
May 20, 2003
9
0
151
Originally posted by casey
Yeah, exactly. If you even pico the thing it breaks, and you have to set up everything again. I want to see what cron jobs my users have set up, but if I pico the ones in /var/spool/cron everything gets deleted. Mind you now, I'm not editing anything just opening and closing. So I'd like to be able to just look at the things.:(

I guess I can just look in /var/spool/cron to see which users have cron jobs and then go to each user's cpanel individually....:(

cPanel.net Support Ticket Number:
Very simple:
ls /var/spool/cron will show you the users that have cron jobs set.

crontab -l -u username => list the jobs set for that username
crontab -e -u username => edit the jobs for that username
crontab -r - u username => remove the jobs for that username

Regards,
Rodrigo

cPanel.net Support Ticket Number:

cPanel.net Support Ticket Number:
 

PWSowner

Well-Known Member
Nov 10, 2001
2,901
4
343
ON, Canada
I just download the files in /var/spool/cron/ and look at them from my personal computer.

Also, I find editing the files, either with pico or by downloading, editing, and uploading, it does work. I just have go into cpanel afterwards, go to the cronjob, choose advanced, and commit changes. Whatever that does, it makes the edited file work.

Does anyone know exactly what the "commit changes" button does?
 

casey

Well-Known Member
Jan 17, 2003
2,288
0
191
Originally posted by rsferreira
Very simple:
ls /var/spool/cron will show you the users that have cron jobs set.

crontab -l -u username => list the jobs set for that username
crontab -e -u username => edit the jobs for that username
crontab -r - u username => remove the jobs for that username

Regards,
Rodrigo

cPanel.net Support Ticket Number:

cPanel.net Support Ticket Number:
Thank you!!!

cPanel.net Support Ticket Number:
 

MySundown

Well-Known Member
Jun 2, 2003
125
0
166
Originally posted by squirrel
Does anyone know exactly what the "commit changes" button does?
I believe it's just another way of saying "save changes".

cPanel.net Support Ticket Number:
 

PWSowner

Well-Known Member
Nov 10, 2001
2,901
4
343
ON, Canada
Originally posted by MySundown
I believe it's just another way of saying "save changes".

cPanel.net Support Ticket Number:
That's what it does is save changes, but what does it do to save changes? It can't just write the lines to the /var/spool/cron file because I did that before uploading the changed file. It must do something with another file to make the changes to the cron file active.

I make cron changes in SSH often, but I always have to go to cpanel to make the changes take effect. How can I make the changes take effect from SSH?
 

rsferreira

Member
May 20, 2003
9
0
151
Originally posted by squirrel
That's what it does is save changes, but what does it do to save changes? It can't just write the lines to the /var/spool/cron file because I did that before uploading the changed file. It must do something with another file to make the changes to the cron file active.

I make cron changes in SSH often, but I always have to go to cpanel to make the changes take effect. How can I make the changes take effect from SSH?
Just read my previous post in this thread. Those commands will do the magic.

cPanel.net Support Ticket Number:
 

PWSowner

Well-Known Member
Nov 10, 2001
2,901
4
343
ON, Canada
Thanks. I just did a test. I uploaded a changed file, then used crontab -e -u username, made a tiny change so I would be able to save upon exit and it worked.

I know I could also just do all my editing there instead of uploading the text file, but I like working on changes on my home computer.

Now I don't need to keep going to cpanel to activate the changes. :) Thanks