Jump to content

How I can run a function at a specified time?


Recommended Posts

Hi all.

I need execute a function at a certain time for example at 00:00 and 12:00.
My initial idea is use a infinite loop that take the time system and compare with the specified time.
I do not know if this is the right way to do it. I think this must have occupied the processor for a long time.
I would appreciate if  comment on whether this is the system that you would use to do this kind of task
or if you know  any UDF to perform this function.

Thanks to all

Link to comment
Share on other sites

  • Moderators

Hi, @Altor. You could do this with using the System time and a sleep function, but best practice if you need to run this consistently on a schedule would be to use the Task Scheduler.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

×
×
  • Create New...