Jump to content
Sign in to follow this  
Gllopc

Sleeping script that doesn't hog CPU and memory?

Recommended Posts

Gllopc

Hello all - I'm hoping I can get some quick advice:

I've written a script that checks to see if a specific condition exists every 5 minutes. I've written a while loop with the code inside of it which sleeps for 5 minutes before it restarts the loop; but it seems to take up a good amount of CPU time and memory (especially over time). I'll never get away with it.

Does anyone know how to place a script into a more idle state which would execute over a specific amount of time through out the day without hogging CPU and RAM? I've considered an Adlib; but I don't think that applies in this situation.

Thanks in advance!

Share this post


Link to post
Share on other sites
PaulIA

Hello all - I'm hoping I can get some quick advice:

I've written a script that checks to see if a specific condition exists every 5 minutes. I've written a while loop with the code inside of it which sleeps for 5 minutes before it restarts the loop; but it seems to take up a good amount of CPU time and memory (especially over time). I'll never get away with it.

Does anyone know how to place a script into a more idle state which would execute over a specific amount of time through out the day without hogging CPU and RAM? I've considered an Adlib; but I don't think that applies in this situation.

Thanks in advance!

Would be nice to see some code that shows the problem you are having. I've written several scripts using Sleep and/or GUIGetMsg and they don't take up CPU or memory.

Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites
kjmarket

Your script sleeps for 5 minutes between loops and hogs memory?? Are you sure its your script and not something else? Post the code...if the problem is the script..someone here will find it.


Pink Floyd - The Wall

Share this post


Link to post
Share on other sites
Gllopc

You know what, you're right. I went back and looked at it again and realized that I had something else (a macro program) running in the background that was hogging up CPU. I also ran the app from Scite and I think that takes more memory than just executing it from the compiled executable.

If it starts acting differently I'll repost.

Thank you all for replying.

Your script sleeps for 5 minutes between loops and hogs memory?? Are you sure its your script and not something else? Post the code...if the problem is the script..someone here will find it.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.