Tuesday, October 26, 2021

#1 2021-09-17 01:48:35 am

ChangeAgent
Member
From:: Scotland
Registered: 2008-03-07
Posts: 383

Blind server Calendar events not executing properly.

I have several scripts (they are sending emails by the way) that get executed from the Calendar App.  They run on a Mac Mini (10.15) with no screen attached.

My suspicion is that when they execute the server is in sleep mode or something and since it at that point does not see the network they fail (I noted that it always takes a few seconds for the network is available on my other computer).  Or would it be something else?  Would be great to hear if anybody has another idea as to what it could be.

So, is there any way of waking the computer up to make sure it is all working as should before the rest of the script executes?

I tried this but that does not seem to make a difference:

Applescript:

set networkUp to false
repeat until networkUp is true
   try
       do shell script "ping -o -t 5 www.google.com"
       set networkUp to true
   on error
       beep
       delay 5
       -- something went wrong, so try again in 5 seconds
   end try
end repeat

Any ideas as to how to fix this?

Offline

 

#2 2021-09-18 12:28:13 am

ChangeAgent
Member
From:: Scotland
Registered: 2008-03-07
Posts: 383

Re: Blind server Calendar events not executing properly.

Thanks KniazidisR and good morning.  I can see why this is a better solution.

I am going to give this a go.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)