How do we feel about delay?

In previous version of AppleScript/Mac OSX, there were some serious issues with the delay command.

I was revisiting an old script and found some weird “on delay”… handlers that intercepted the delay command, and called a shell script delay.

I have two questions:

  • Has the delay issue been fully rectified? (I hope so because I’ve been using it)

  • Does a long delay (5 minutes, for example) tie up system resources?

I have a script that checks an FTP site looking for a specific file, and if it’s not there, I want it to look again in 5 minutes. Normally, I’d think the idle command would be good, but this would be a non-trivial rewrite of the script, that uses idle for another purpose.

I’ll try a 5 minute delay and see if I notice an effect, but I’m wondering if anyone else has looked at this?

1 Like

“delay” bug appeared in macOS 10.10 and fixed 10.11.
Apple is a strange company to be known release their software without checking
Every early version of macOS beta has “POSIX path” conversion bug or version identify bug.
A friend of mine told me the first version of macOS 13 beta does not work Script Menu
I asked him to report it to Apple.

If you want to check delay command’s health, you can measure 1 or a few second by AppleScript itself. We can measure sub-second time by using Cocoa functions.

I don’t think so. You can know it by using Activity Monitor tool.
Delay command seems not to consume much system resources.

1 Like

Presumably not zero, though? And likely depends on whatever else is happening at any given time, and what resources one’s computer has to begin with.