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.

Cron how it works. [moved]

Discussion in 'General Discussion' started by rip_curl, Feb 9, 2006.

  1. rip_curl

    rip_curl Well-Known Member

    Joined:
    Jan 30, 2005
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    Cron how it works.

    I want to get every minute a listing of my directory to my email.
    how can i set this command to cron in cpanel?
     
  2. rip_curl

    rip_curl Well-Known Member

    Joined:
    Jan 30, 2005
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    up
    help please
     
  3. netkinetics

    netkinetics Well-Known Member

    Joined:
    May 14, 2004
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Home is Baltimore, MD - Currently in the Philippin
    Just ls -lah /home/whatever/ | mail -s "your directory, sir" your.email@domain.com .. add it to the cron via cpanel or ssh.

    That's going to get really, *really* annoying :confused: .. not sure why you'd want to do that but have a blast :)
     
  4. rip_curl

    rip_curl Well-Known Member

    Joined:
    Jan 30, 2005
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6

    when i go to cpanel>cron>adv. unix usrs.> and making follow:

    ls -lah /home/username/ | mail -s "public_html" your.email@domain.com


    it's nothing not working.

    maybe i'm doing something wrong?
     
  5. netkinetics

    netkinetics Well-Known Member

    Joined:
    May 14, 2004
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Home is Baltimore, MD - Currently in the Philippin
    assume the user is johndoe :

    ls -lah /home/johndoe/public_html | mail -s "Directory listing (this is the subject of the email" your.email@goes.here.com

    Sorry for any confusion :)

    Mail will arrive from root@yourserver.hostname.com
     
  6. rip_curl

    rip_curl Well-Known Member

    Joined:
    Jan 30, 2005
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    thank you very much

    I'm making this command - Cpanel says "Cron updated'

    but nothing not working.
    what should I check firstly

    log file says:
    Feb 10 17:50:24 web-c-1 /usr/bin/crontab[31536]: (username) AUTH (crontab command not allowed)
     
    #6 rip_curl, Feb 10, 2006
    Last edited: Feb 10, 2006
  7. netkinetics

    netkinetics Well-Known Member

    Joined:
    May 14, 2004
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Home is Baltimore, MD - Currently in the Philippin
    Sorry just add it to root's crontab (/var/spool/cron/root) , I forgot mail was owned by bin/mail (not wheel).

    You may need to google to figure out how to edit root's crontab.. can't give you all the answers ;) You could also do this with simple perl or php ... the example I gave you was just a quick reply that went way, way farther than I ever thought it would :P

    HTH
     
  8. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    I am not totally certain which is more freightening to me ...

    The fact that they don't know how to setup crontabs ...

    (OR)

    The fact they actually want to email themselves EVERY MINUTE!
     
  9. rip_curl

    rip_curl Well-Known Member

    Joined:
    Jan 30, 2005
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    and what must i make that user could work with this commands?
     
  10. ShockHosts

    ShockHosts Well-Known Member

    Joined:
    Nov 25, 2005
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    Someone tell him a code to take it away, because I can guarantee you won't want it every day :P
     
  11. rip_curl

    rip_curl Well-Known Member

    Joined:
    Jan 30, 2005
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    i just want to test my crontab
    thats all
     
  12. rip_curl

    rip_curl Well-Known Member

    Joined:
    Jan 30, 2005
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    oh, that's user was in /etc/eron.deny

    I've deleted it =)
     
Loading...

Share This Page