Queueing Scripts to use with WebMon

Asked by denywinarto

Hi, i plan to implement sikuli in my game server, but my situation is a little complex.

I need to run a bunch of game launchers that is updated frequently every week or so.
When they're updating, they notify it in their websites.

So to accomplish this i have to activate sikuli scripts in conjunction with webmon,
a page-change monitoring program.

http://debfx.fobos.de/webmonx/index.php

So Whenever a change in the website is notified to me, the sikuli script for that website will be activated.
(e.g : if abc.com is updated, run abc.skl)

Now the problem is, what if there are 2 updates that happen at the same time?
Or happen before the running sikuli script is finished?
That means there will be 2 sikuli scripts that bump into each other..

If this happened, would sikuli queue it, or run the newer one instead?

Or maybe, Is there anyway to create some sort of watcher that will capture and queue sikuli scripts?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
denywinarto
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Depending on how you do it, you can start as many Sikuli scripts in parallel, as you want using e.g. Sikuli-IDE-w.bat.
These scripts will run independently from each other and hence influence each other, since use of mouse and keyboard cannot be coordinated between the scripts. There is no queuing mechanism in Sikuli, that can help you with this problem.

conclusion: you have to take care, that only one Sikuli script (that acts on the GUI using mouse and keyboard) runs on a system at a given time.

If you do not have the possibility, to arrange this in webmonx, then I think, the easiest way is to do the following:
- in the batch file, you use to start the script, create a file with a unique filename containing a timestamp.
- give this filename as a parameter to the script
- when the script starts, it checks, wether its own timestamp-filename is the oldest one
-- if yes, it starts running and before completion, it deletes its timestamp-filename
-- if no, it waits until its timestamp-filename becomes the oldest one

Revision history for this message
denywinarto (deny-winarto) said :
#2

sorry, i couldnt find this thread, i think queueing shouldnt be a problem if i use website watcher, because it has wait parameter that waits until a script is finished running.. thanks