High CPU utilization caused by bandwidth in vbs cycle

Source: Internet
Author: User

You only need to add script. Sleep 100 to the statement.

:

  1. OptionExplicit
  2. On Error Resume Next It is best to remove this field in 'zookeeper. Otherwise, the zookeeper cannot be found.
  3. DimWsh, sprogramme, sruntime, ntime
  4. Sprogramme ="Test. Bat"
  5. Sruntime = mid (time, 4, 5)
  6. Ntime = mid (time, 4, 5)
  7. Msgbox ntime
  8. Do While True
  9. Wscript. Sleep 1000'Use this sentence in the example to solve the problem.
  10. IfNtime = sruntimeThen
  11. SetWsh = wscript. Createobject ("Wscript. Shell")
  12. Wsh. Run"Taskkill/f/IM iexplore.exe", 0,True
  13. Wsh. Run sprogramme, 0,True
  14. SetWsh = nothing
  15. Sruntime = dateadd ("H", 2, time)
  16. Sruntime = mid (sruntime, 4, 5)
  17. Msgbox sruntime
  18. Exit Do
  19. End If
  20. Ntime = mid (time, 4, 5)
  21. Wscript. Sleep 1000
  22. Loop

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.