Description: "Task Plan", sometimes called as "scheduled Tasks", everyone is accustomed to call Windows Scheduled tasks, in fact, people really called "mission plan": see, there is a picture of the truth
Before doing the project, encountered this is not the problem of the problem, do not hide the implementation of the interface "small black Window", the program will be carried out, but if someone at the same time in the operation of this computer, accidentally, the execution of the small black window closed, then there is a problem, especially in the production environment,
So try a few ways to solve this problem:
Method 1: Log in with a different account
For example, the currently logged in user is administrator, you can create a new user "Jack", in "change user or group" when the user,
Log in without this user login, each execution will not appear "small black Window", note: This time, the following must be selected "regardless of whether the user is logged in to run",
Otherwise, this task is not scheduled to execute
Method 2: Use the VBS script to execute,
The following two scripts can be executed,
Script 1:
</pre><pre name= "code" class= "VB" >dim objshellset objshell=wscript.createobject ("Wscript.Shell") Ireturn=objshell.run ("cmd.exe/c D:\LogFiles\APPService\AppServer.exe", 0, TRUE)
"D:\LogFiles\APPService\AppServer.exe"EXE file to be executed
The hidden window only needs to set the second parameter of run to 0, the display is set to 1;
Script 2
Set Winscripthost = CreateObject ("Wscript.Shell") Winscripthost.run Chr & "<pre name=" code "class=" VB ">d : \logfiles\appservice\appserver.exe<span style= "font-family:arial;" > "& Chr (0</span>),
Set Winscripthost = Nothing
The hidden window only needs to set the second parameter of run to 0, the display is set to 1;
Configuration such as:
Set the time interval for execution as needed:
Perfect solution!
There are a number of ways to set the form to hide, which is for your reference only.
If there is a good way, please let us know.
Windows Task Scheduler hides several ways to execute windows