Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


59 posts

Master Geek
+1 received by user: 6


Topic # 222894 2-Sep-2017 14:34
2 people support this post
Send private message

I've been finding recently that I've have to routinely reboot my Huawei B315 fixed wireless modem/router, in order to get any reasonable performance out of it. By routinely I mean every 1-2 days.

 

Anyway, I got tired of doing it manually via a web browser, so I wrote a PhantomJS script to automate the reboot. The script logs onto the web UI, and clicks through the reboot process.

 

PhantomJS itself doesn't require much in the way of external dependencies, and runs headless in a CLI. Given that, it can be scheduled to run in a cron job every night, or whatever.

 

 

 

I'm sharing it here in case anyone else wants an example (my JS is pretty rough btw, not my preferred scripting language):

 

https://gist.github.com/jonathanhoskin/0bc11f55d0ec926c0a457d4110b1f46f

 

 

 

PhantomJS:

 

http://phantomjs.org/download.html

 

 

 

Feel free to get in touch if you have any questions :-)

 

 


Create new topic
'That VDSL Cat'
8091 posts

Uber Geek
+1 received by user: 1688

Trusted
Spark
Subscriber

  Reply # 1857243 2-Sep-2017 17:18
Send private message

Simple approach to it, nicely done! 





#include <std_disclaimer>

 

Any comments made are personal opinion and do not reflect directly on the position my current or past employers may have.




59 posts

Master Geek
+1 received by user: 6


  Reply # 1857340 2-Sep-2017 19:56
Send private message

hio77:

 

Simple approach to it, nicely done! 

 

 

Thanks!


Create new topic

Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

Microsoft Dynamics 365 Business Central launches
Posted 10-Jul-2018 10:40


Spark completes first milestone in voice platform upgrade
Posted 10-Jul-2018 09:36


Microsoft ices heated developers
Posted 6-Jul-2018 20:16


PB Technologies charged for its extended warranties and warned for bait advertising
Posted 3-Jul-2018 15:45


Almost 20,000 people claim credits from Spark
Posted 29-Jun-2018 10:40


Cove sells NZ's first insurance policy via chatbot
Posted 25-Jun-2018 10:04


N4L helping TAKA Trust bridge the digital divide for Lower Hutt students
Posted 18-Jun-2018 13:08


Winners Announced for 2018 CIO Awards
Posted 18-Jun-2018 13:03


Logitech Rally sets new standard for USB-connected video conference cameras
Posted 18-Jun-2018 09:27


Russell Stanners steps down as Vodafone NZ CEO
Posted 12-Jun-2018 09:13


Intergen recognised as 2018 Microsoft Country Partner of the Year for New Zealand
Posted 12-Jun-2018 08:00


Finalists Announced For Microsoft NZ Partner Awards
Posted 6-Jun-2018 15:12


Vocus Group and Vodafone announce joint venture to accelerate fibre innovation
Posted 5-Jun-2018 10:52


Kogan.com to launch Kogan Mobile in New Zealand
Posted 4-Jun-2018 14:34


Enable doubles fibre broadband speeds for its most popular wholesale service in Christchurch
Posted 2-Jun-2018 20:07



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.