Geekzone: technology news, blogs, forums
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):








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



Create new topic
'That VDSL Cat'
7251 posts

Uber Geek
+1 received by user: 1421


  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



Simple approach to it, nicely done! 




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 »

Stuff Pix enters streaming video market
Posted 21-Mar-2018 09:18

Windows no longer Microsoft’s main focus
Posted 13-Mar-2018 07:47

Why phone makers are obsessed with cameras
Posted 11-Mar-2018 12:25

New Zealand Adopts International Open Data Charter
Posted 3-Mar-2018 12:48

Shipments tumble as NZ phone upgrades slow
Posted 2-Mar-2018 11:48

Oppo R11s: high-end Android, budget price
Posted 27-Feb-2018 16:27

Samsung New Zealand introducing the Galaxy S9 and S9+
Posted 26-Feb-2018 07:00

Fujifilm X beats its best with new top of the range, high-performance camera
Posted 24-Feb-2018 14:05

One million kiwis affected by cybercrime
Posted 24-Feb-2018 13:58

New Zealanders want to engage with government online and via mobile apps
Posted 24-Feb-2018 13:56

Samsung launches Samsung Max
Posted 24-Feb-2018 13:52

CPTPP text and National Interest Analysis released for public scrutiny
Posted 21-Feb-2018 19:43

Foodstuffs to trial digitised shopping trolleys
Posted 21-Feb-2018 18:27

2018: The year of zero-login, smart cars & the biometrics of things
Posted 21-Feb-2018 18:25

Intel reimagines data centre storage with new 3D NAND SSDs
Posted 16-Feb-2018 15:21

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.