Why is this script timing out?

activate me
display dialog "Email backup is now finished;
	feel free to mail again!" buttons {"OK"} default button "OK" giving up after 6

It worked fine for years now it regularly times out. Means I get a warning box that a script timed out.

This script runs once my backup with ChronoSync has finished. CS allows for a Applescript to run before and/or after a backup happens.

I am on OS 10.15.7 by the way.

This script cannot time out. Look for the problem before it is better - in the commands that create the backup.

By default, each command has 120 seconds. But you can specify longer times using the with timeout block. For example, with timeout of 6000 seconds. That is, 100 minutes.

Thanks,

as said this script gets triggered by ChronoSync. So it starts fine but then times out. So not sure how to do anything before that.

Are you saying one can not specify shorter times than 120 seconds? Is that the problem?

I did not say that it is impossible to set a timeout less than 120 seconds. You are missing 120 seconds for some operations before the dialog is displayed. That is, on the contrary, you need to set more time (increase the timeout).

Unfortunately, I do not know anything about ChronoSync, so I can hardly help further.

There is a way this script can timeout. It has to do with the Display Dialog command.

It depends on how the script gets called (I.E. from which program).
If that program is not the frontmost then the dialog doesn’t appear until it is brought to the front.

If the user never brings the program to the front it will timeout.
Is the script a standalone app or a compiled script?
Activate me will work with a standalone app, but you might have to be more specific by naming the app that is running the script.

Also you should use the “Display Alert” command if there is only one button, much simpler.

try this


tell application "loginwindow" to display alert "Email backup is now finished;
feel free to mail again!" giving up after 6

Good info, I look in it more and see if I find the problem. And thank you for the script suggestion, I did not know this.

well I changed my script to yours and it still gives the message that it is timing out.

Without specificity of how and when then script gets called, I can’t guess further.

OK thanks. I try some other things and get back if I am stuck. thanks for your help anyway.