Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Member
    Join Date
    Jan 2005
    Posts
    71

    Default 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. #2
    Member
    Join Date
    Jan 2005
    Posts
    71

    Default

    up
    help please

  3. #3
    Member
    Join Date
    May 2004
    Location
    Home is Baltimore, MD - Currently in the Philippines
    Posts
    62

    Default

    Quote Originally Posted by rip_curl
    up
    help please
    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 .. not sure why you'd want to do that but have a blast
    Serverbalance - Custom Clusterd Solutions Done Right, Affordably!

  4. #4
    Member
    Join Date
    Jan 2005
    Posts
    71

    Default

    Quote Originally Posted by netkinetics
    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 .. not sure why you'd want to do that but have a blast

    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. #5
    Member
    Join Date
    May 2004
    Location
    Home is Baltimore, MD - Currently in the Philippines
    Posts
    62

    Default

    Quote Originally Posted by rip_curl
    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?
    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
    Serverbalance - Custom Clusterd Solutions Done Right, Affordably!

  6. #6
    Member
    Join Date
    Jan 2005
    Posts
    71

    Default

    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)
    Last edited by rip_curl; 02-10-2006 at 07:01 AM.

  7. #7
    Member
    Join Date
    May 2004
    Location
    Home is Baltimore, MD - Currently in the Philippines
    Posts
    62

    Default

    Quote Originally Posted by rip_curl
    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)
    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
    Serverbalance - Custom Clusterd Solutions Done Right, Affordably!

  8. #8
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    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. #9
    Member
    Join Date
    Jan 2005
    Posts
    71

    Default

    and what must i make that user could work with this commands?

  10. #10
    Member
    Join Date
    Nov 2005
    Posts
    125

    Default

    Someone tell him a code to take it away, because I can guarantee you won't want it every day :P

  11. #11
    Member
    Join Date
    Jan 2005
    Posts
    71

    Default

    i just want to test my crontab
    thats all

  12. #12
    Member
    Join Date
    Jan 2005
    Posts
    71

    Default

    oh, that's user was in /etc/eron.deny

    I've deleted it =)

Similar Threads & Tags
Similar threads

  1. cron fails but browser execution works
    By blissend in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-12-2010, 06:08 PM
  2. cron job, help [moved]
    By tabuladze in forum New User Questions
    Replies: 4
    Last Post: 06-15-2006, 09:03 PM
  3. Cron job help? [moved]
    By Katrina M. in forum New User Questions
    Replies: 2
    Last Post: 09-09-2005, 08:30 AM
  4. Wondering How it Works [moved]
    By maddog39 in forum New User Questions
    Replies: 1
    Last Post: 06-21-2005, 07:08 PM
  5. cron jobs no longer works
    By pmayo in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 09-27-2004, 12:36 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube