Restart script after error - calling from command line

Asked by Alex G on 2019-08-12

If I run a script manually from the IDE and it errors out somewhere, I am able to just hit Run again and it continues from where it left off. If I call a script from command line, is there any way to do this?

Running it from command line does not open the IDE, it just starts running the script and if it fails, I am not notified in any way, nor do I see a way to restart the process. I am using command line because it is an automated task that runs on its own.

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
Alex G
Solved:
2019-08-13
Last query:
2019-08-13
Last reply:
2019-08-13
RaiMan (raimund-hocke) said : #1

--- ... and it continues from where it left off
only possible in the IDE and only with 1.1.4+:
use the context menu (right mouse on line number)

not possible from commandline.
there you have to implement your own logic: logging of steps and skip completed steps on restart.

--- and if it fails, I am not notified in any way,
you should get the same notifications as when running in IDE.

You might enhance your script with logging messages and/or with exceptions like FindFailed to get the information, where your script stopped working.

Alex G (alexg2207) said : #2

Is it possible to have the IDE come up when you call the script from command line or just have the script restart on error automatically?

Alex G (alexg2207) said : #3

Is it possible to have the IDE come up when you call the script from command line or just have the script restart on error automatically?

Alex G (alexg2207) said : #4

Decided to go another route as I found out this is not possible.