Jump to content
Sign in to follow this  
Roman

Elegant way to perform a time-query?

Recommended Posts

Hi

I'm still quite new with AutoIt and i wonder how to script (most elegantly) this:

I want to perform a job (a function or something else - dosen't matter) inside the script at exactly a specific time, e.g. every day at 11:00h. The script should always be running (sleeping?) and at this time do something once. Then the script again should wait for the next day 11:00h and so on...

How do i script this "time-query" most elegantly? :D

Thanks for all suggestions!

Roman.

Share this post


Link to post
Share on other sites

Hi,

While 1

Sleep(30000)

If @Hour = 11 And @Min = 00 Then ...

Wend

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

While 1

Sleep(30000)

If @Hour = 11 And @Min = 00 Then ...

Wend

Thanks. I did this already, but additional with "... AND If @SEC = 0", because it needs to be exactly on 11:00:00h. The problem now is that if the script does meanwhile something else, it could miss this one second for the query and do nothing.

Probably my question was imprecisely.

Thanks again.

Roman.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...