Schedule an script execution at a certain time

Scripts and programs to automate Astroart
Post Reply
DortCe
Posts: 2
Joined: 27 Nov 2021, 17:33

Schedule an script execution at a certain time

Post by DortCe » 27 Nov 2021, 17:36

Hi,

I have been writing a few scripts using the documentation in Astroart.

There is something that I have not found in the documentation, I'd like to schedule an script execution at a certain time, for example, 4am.

Is this possible?

Best Regards.

fabdev
Posts: 461
Joined: 03 Dec 2018, 21:43

Re: Schedule an script execution at a certain time

Post by fabdev » 27 Nov 2021, 21:45

Hi,
it could be done with the function Time() or the function JD(), for example:

Code: Select all

sub WaitTime(s)
  while true
     if Mid(Time(), 1, 5) = s then break
     print Time() + " waiting..."
     Pause(1)
     Cls
  end while
end sub

WaitTime("04 00")
Instead of waiting for a given time, it can be more optimized to wait for a given altitude of the Sun. For example:
viewtopic.php?f=5&t=301

DortCe
Posts: 2
Joined: 27 Nov 2021, 17:33

Re: Schedule an script execution at a certain time

Post by DortCe » 28 Nov 2021, 13:15

Thx a lot, that was very useful :)

Post Reply