Thread: Cron question

    #1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Location
    Barcelona
    Posts
    295
    Rep Power
    77

    Cron question


    I am using this Cron:
    cd /usr/bin; ./uptime 2>&1 | mail -s "System load" my@email.com

    to receive every certain time the load status of my server.
    This is what I get in my email: "20:00:01 up 6:00, 0 users, load average: 0.06, 0.10, 0.13"

    What I would really like is to be able this data to be received by one script, let's say, www.myWeb.com/load.php so that the collected data is saved to obtain a graphic instead of figures.

    Can you guide me to accomplish this? My problem is to know if I can put an URL in the Cron instead of the email address.

    Thank you.
    Last edited by Pere; July 17th, 2013 at 03:13 PM.
    Pere
    www.casti2001.com
  2. #2
  3. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,853
    Rep Power
    6351
    You can use curl instead of mail for this.

    Moving this thread somewhere more appropriate.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Location
    Barcelona
    Posts
    295
    Rep Power
    77
    Originally Posted by ManiacDan
    You can use curl instead of mail for this.

    Moving this thread somewhere more appropriate.
    Where is now my thread?
    Thank you.

    I need some more help.
    Pere
    www.casti2001.com
  6. #4
  7. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,853
    Rep Power
    6351
    Your thread is now in "Linux Help," since it had nothing to do with PHP.

    The syntax for curl is relatively simple, use "man curl" to get to the manual.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo