The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Where are users' cron jobs stored?

Discussion in 'General Discussion' started by casey, Aug 8, 2003.

  1. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    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. jackal

    jackal Well-Known Member
    PartnerNOC

    Joined:
    Feb 23, 2002
    Messages:
    708
    Likes Received:
    0
    Trophy Points:
    16
    /var/spool/cron/

    cPanel.net Support Ticket Number:
     
  3. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    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:
     
  4. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    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. rsferreira

    rsferreira Member

    Joined:
    May 20, 2003
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    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. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    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?
     
  7. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Thank you!!!

    cPanel.net Support Ticket Number:
     
  8. MySundown

    MySundown Well-Known Member

    Joined:
    Jun 2, 2003
    Messages:
    128
    Likes Received:
    0
    Trophy Points:
    16
    I believe it's just another way of saying "save changes".

    cPanel.net Support Ticket Number:
     
  9. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    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?
     
  10. rsferreira

    rsferreira Member

    Joined:
    May 20, 2003
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Just read my previous post in this thread. Those commands will do the magic.

    cPanel.net Support Ticket Number:
     
  11. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    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
     
Loading...

Share This Page