Make windows run my script frequently

Author Message
johnBroecher

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 5/23/2011
  • Status: offline
Make windows run my script frequently Monday, May 23, 2011 3:10 PM (permalink)
0
Hi,

I'm a newbie and I have wrote a vb script that I want my computer to run frequently. The script just checks for the existence of a file (which will rarely be there) and it runs another script when it does exist. Right now I have windows task scheduler running the script every 1 minute. I would like a fairly fast response here, but I don't know what is practical. Another idea I had was to make my script run at start up and just loop indefinitely.

Should I be worried about my computer running this thing all the time?

I tried to make the script impossible to give errors but hey, what do I know... Should I be worried about  error messages popping up onto the computer 10 million times and crashing?

Please give me some advice here on how to run this thing efficiently.

Thanks!

 option explicit  
 dim wshShell, objFSO, object 
 
 Set objFSO = CreateObject("Scripting.FileSystemObject") 
 
 If objFSO.FileExists("C:\YesRun.Toggle") Then 
 If objFSO.FileExists("C:\RunScriptOnce.bat") Then 
 Set wshShell = WScript.CreateObject("WSCript.shell") 
 wshshell.run "C:\RunScriptOnce.bat > output.txt", False 
 
 Set object = CreateObject("Scripting.FileSystemObject") 
 object.MoveFile "C:\YesRun.Toggle" , "C:\NoRun.Toggle"  
 
 End If 
 End If 
 
 set wshshell = nothing 
 set objFSO = nothing 
 set object = nothing 

<message edited by johnBroecher on Monday, May 23, 2011 3:11 PM>
 
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.9