Results 1 to 11 of 11

Thread: Where are users' cron jobs stored?

  1. #1
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default Where are users' cron jobs stored?

    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:

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge jackal's Avatar
    Join Date
    Feb 2002
    Posts
    708

    Default

    /var/spool/cron/

    cPanel.net Support Ticket Number:

  3. #3
    Member
    Join Date
    Mar 2002
    Location
    Alberta, Canada
    Posts
    1,509

    Default

    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:
    Helping people Host, Create, and Maintain their Web Site
    Also providing Server Admin Services - setup / troubleshooting

    http://potentproducts.com/

  4. #4
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default

    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:

  5. #5
    Member
    Join Date
    May 2003
    Posts
    8

    Default

    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:

  6. #6
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    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?
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

  7. #7
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default

    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:

  8. #8
    Member
    Join Date
    Jun 2003
    Posts
    128

    Default

    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:

  9. #9
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    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?
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

  10. #10
    Member
    Join Date
    May 2003
    Posts
    8

    Exclamation

    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:

  11. #11
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    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
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

Similar Threads

  1. Where put cpanel the cron jobs of the users?
    By mgrizal in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 08-17-2009, 07:49 PM
  2. cpanel users running cron jobs
    By djblamire in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 07-09-2007, 10:55 AM
  3. users cron jobs
    By 4u123 in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 01-12-2006, 02:47 PM
  4. users lost access to cron jobs
    By aquagerbil in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 11-30-2005, 02:27 AM