Testing internet connection / offline data storage

Asked by William Ting on 2008-03-27

This question is really two parts.

1) Can the script be modified to test for internet connection, and if internet connection exists; then try to authenticate?

I like to load the script upon Gnome startup, but many times my wireless connection hasn't kicked in yet. Because of that, it asks for me authentication info even though it's correct. A simple way would be to ping the rescuetime.com server and if there's a response, then authenticate.

2) The second question is kinda related. If I am offline, can you store the usage info offline and once I have rescuetime.com access and authenticate correctly, send all information to the server?

Thanks for reading!

Question information

Language:
English Edit question
Status:
Answered
For:
RescueTime Linux Uploader Edit question
Assignee:
No assignee Edit question
Last query:
2008-03-27
Last reply:
2008-03-27
Angus Helm (angus.helm) said : #1

It should already be handling 2 correctly. I need to fix it to do 1. I have the same problem when I move back and forth between home and the office. I was going to check for an HTTPError, but pinging rescuetime.com beforehand would probably be a better way to test it.

Can you help with this problem?

Provide an answer of your own, or ask William Ting for more information if necessary.

To post a message you must log in.