1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Admin -> Scheduler -> Open/Call a webpage once a day

Discussion in 'Tomato Firmware' started by nerdtalker, Jan 14, 2009.

  1. nerdtalker

    nerdtalker Network Guru Member

    I've got a relatively simple/stupid question. I want to create a schedule entry in Admin -> Scheduler which opens and closes a simple webpage on my network.

    The webpage is simply: http://192.168.1.52/adm/reboot.cgi and it reboots a particular network device that needs a reboot about every day to stay working properly. It's a bit temperamental (It's a WVC54GCA Linksys wireless network camera which locks up every 1-2 days, I think it has to do with the motion detection overloading it or being the source of some software glitch) and a new firmware revision is on it's way (so promises Linksys).

    Until that time, I'm left to either waiting for it to lock up (at which point I need to go access it physically) or go to the reboot page every day (which is what I'd like the scripting page to do). Any ideas? This has got to be simpler than I'm making it.
     
  2. nerdtalker

    nerdtalker Network Guru Member

  3. nerdtalker

    nerdtalker Network Guru Member

    Spoke too soon. I have:

    telnet 192.168.1.52 80
    GET /adm/reboot.cgi HTTP/1.0
    Host: localhost
    Authorization: Basic ------My Base64 string------

    But I need an additional carriage return after the end of the last line. Tomato automatically removes this extra return, but it's critical, or the command doesn't actually execute and the get request never happens.
     
  4. nerdtalker

    nerdtalker Network Guru Member

    I worked a bit, and decided to try using:

    sch_c1_cmd=telnet 192.168.1.52 80 GET /adm/reboot.cgi HTTP/1.0 Host: localhost Authorization: Basic --Mybase64string--

    But I think I've encoded the carriage returns incorrectly. Arrgh.
     
  5. SgtPepperKSU

    SgtPepperKSU Network Guru Member

    I think you could just do
    Code:
    wget -o /dev/null http://user:pass@192.168.1.52/adm/reboot.cgi
    Or am I misunderstanding what you want to do?
     
  6. nerdtalker

    nerdtalker Network Guru Member

    Ahh, that would work too, I think. Good point! Let me try!
     
  7. nerdtalker

    nerdtalker Network Guru Member

    I think you meant:

    Code:
    wget -O /dev/null http://admin:pass@192.168.1.52/adm/reboot.cgi
    
    With a capital O right?
     
  8. nerdtalker

    nerdtalker Network Guru Member

    Works perfectly! Thanks SgtPepperKSU! I feel stupid, I should've done that in the first place. I completely forgot about wget :D

    That's what I get for trying to do this so late at night!
     
  9. danix71

    danix71 LI Guru Member

  10. SgtPepperKSU

    SgtPepperKSU Network Guru Member

    Yes, I sure did. Good catch.

    Glad you got it working.
     

Share This Page