Delphi - Windows automatic scheduled task and ParamStr Detailed

Windows automatically scheduled tasks and ParamStr Detailed

 

ParamStr function:

ParamStr(1),..ParamStr(N)

ParamStr (1) a first parameter representative of program entry, empathy, ParamStr (N) represents the N parameters. It can be assigned parameters by the following operation.

E.g:

C below a plate 1.exe executable program;

In the input Win + R: C: \ 1.exe 1 2 3 ...

则ParamStr(1)= '1' 、ParamStr(2)= '2'、ParamStr(3)='3'...

 

Create automatic scheduled task on Windows Server, to achieve the specified business logic processing:

Creating Delphi WinFrm application and write the following code in OnShow event:

 

. 1  IF ParamStr ( . 1 ) = ' the Run '  the then 
2  the begin 
. 3      // business logic of the edit 
. 4  End ;
View Code

Create a scheduled task, the trigger bar set execution time interval, such as point of time. In operation column write parameters (executable program needs and the parameters of association, the Run written here), as follows:

 

 

Guess you like

Origin www.cnblogs.com/jeremywucnblog/p/11417771.html