You are not logged in.

#1 2010-12-07 11:57:24

hak5fan
Member
Registered: 2008-08-31
Posts: 5

[request] an online queue application

Hi all

I've recently returned to arch, after using ubuntu for a while. Since I find myself using a lot of different computers I've installed arch on my usb stick, and i'm quite happy with my setup

However, I'm in search for an app. When i schedule a command that requires internet acess, there is no way of knowing if i'm connected to the internet.

I could have a script that checks for internet connectivity and i'f the computer is not online it could sleep for say 10 seconds before trying to run the command again. The problem with this however, is that I would then end up with a lot of background scripts checking for internet connectivity constantly.

This could quite posibly be implemented in bash or python, but I don't know any of those languages and my exams are just a few days from now so I have absolutly no time to learn. If any of you bash gurus out there feel like helping out it would be greatly appriciated.


What i need is something like this.
a function that checks for internet connectivity
a function that can add tasks to a queue. All the tasks in the queue are executed imidiatly when i reconnect to the internet.

An overveiw In psudo-code

function online() // Checks if the computer is connected to the internet. Returns a boolean value
function addToOnlineQueue(task) // Adds a task to the online queue. The task could be either a path to a shell-script or a single shell command. Returns a boolean value
// The code to execute the queue
for (each task in queue)
  exec task

The code to ececute all the tasks in the queue could be added to the network manager dispatcher or something like that.

I hope this was possible to understand. My English really is rusty.

Thanks in advance

Offline

Board footer

Powered by FluxBB