Emergency resume and RoboTarget issue/question

Question to the experts:

I am using an all-night drag script which runs RoboTarget. RoboTarget is configured to run during astronomical night (+/- 15min). In case of an emergency_suspend, I want to wait until the end of the civil night before jumping to emergency_exit to have a chance to take sky flats at dawn.

Now the unwanted result: If the emergency_resume happens later than the end of the astronomical night but within civil night (say 6am), the script returns to where the suspend happened: it restarts the RoboTarget. Unfortunately, the RoboTarget recognises that it was started outside the astronomical night and waits for the next one, which is the evening of that day.
So the script gets stuck in the RoboTarget and doesn’t run the sky flat dawn routine and doesn’t run the night end procedure.

Is there any clever way to avoid this?

Can I somehow force RoboTarget to wait for astronomical night only if it’s later than a given time, say 8am? In that case it could recognise that the actual night has just passed and exit. The rest of the script would run as expected.
Could I include such a time condition in the main drag script for the RoboTarget run and will this condition be checked again by the emergency resume or will it restart the RoboTarget without checking a time constraint?

Any hint would be a appreciated.

Regards, Mathias

P.S.: Forcing RoboTarget directly to run within the civil night is not the solution I have in mind since I do not want to make observations under bright sky.

Something is not correct in what you have reported: RoboTarget do not wait for the next night but exit from action is the night is passed (every type of night you have configured).

If you dont want to resume from suspend block use a Resume from Block and specify the block and do your check.

Take a look at how working the default perpetual dragscript:
https://wiki.starkeeper.it/index.php/DragScript_Examples#Perpetual_Script_H24.2F7Days

Hello again. I checked the log again with more intensity. You’re right. The resume did jump back to the RoboTarget. The RoboTarget skipped correctly, but the SKIPPED condition incorrectly jumped back to a point before the wait for the night start. It was not the RoboTarget that got me into the self-made trap.

Thanks for the help, Leo!