Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

Need timer to clear logs in continuous script

$
0
0

Hi, i have a script and it checks servers in the farm for high cpu and mem usage, im planing on running it continuously 24/7. I have it send an email if anything flagged and then log that in a file, i would like to clear this log file every hour.

The trouble is that this script is in a while loop and I cant seem to figure out how to incorporate a timer in this loop without it beeing set/reset everytime. Maybe something global i would need to set? Any ideas or help is appreciated.

Thanks


Viewing all articles
Browse latest Browse all 2562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>