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.

Anyone have a script that will mail files from the server that can be run in CRON?

Discussion in 'E-mail Discussions' started by sqsisa, May 16, 2003.

  1. sqsisa

    sqsisa Well-Known Member

    Joined:
    Apr 8, 2003
    Messages:
    97
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Bay Area, CA
    Ok, so I'm tired of PICOing my log files via SSH. Anyone have a script or know the syntax to grab specified log files and mail them? It would be good to set it as a Cron job and have them shot daily for review on a local machine.

    Would appreciate any help or suggestions.
     
  2. Nico

    Nico Well-Known Member

    Joined:
    Dec 5, 2001
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Edmond, OK
    You can create a PHP script to do that with the 'fopen' function and the 'mail' function. Cpanel did email the log files a year or so ago. You might also look into a prgram called 'Logcheck' it will email the log files as well.
     
Loading...

Share This Page