Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Safest way to idle delphi application to wait for timer?

I am doing a delphi application that will run on my pc 24/7 in the background and will check if it has to do some actions or not, wait 30 minutes and check again, and so on.

How can I make sure the application will not overload cpu or memory because of being running all the time.

like image 931
Sebastian Avatar asked Dec 01 '22 10:12

Sebastian


1 Answers

Create a timer to run every 30 minutes, and call your checks/actions from there. Then your application can just sit idle when there is nothing to do.

Alternatively you could create a Scheduled Task that just runs periodically to do this.

like image 72
Justin Ethier Avatar answered Dec 10 '22 23:12

Justin Ethier