我需要代码如何在特定时间内启动流程



**我需要代码如何在特定时间内启动流程例如

**
if  --- date "01/10/1991"  then 
process.start
end if

**

您可以使用以下测试条件:

if ( DateTime.Today == new DateTime(2021, 01, 10) )
RunShell(filePath)/*.WaitForExit()*/;

日期时间。今日房地产

DateTime(Int32、Int32和Int32)构造函数

例如:

using System.Diagnostics;
static public Process RunShell(string filePath, string arguments = "")
{
var process = new Process();
try
{
process.StartInfo.FileName = filePath;
process.StartInfo.Arguments = arguments;
process.Start();
return process;
}
catch ( Exception ex )
{
Console.WriteLine or MessageBox.Show(ex.Message + Environment.NewLine + filename);
}
}

其中,filePath是文件或网络链接的完整路径。

过程。启动方法

最新更新