我想知道如何在后台每隔5分钟增量运行一个c#程序。下面的代码并不是我希望作为后台进程运行的,但希望找出使用此代码执行此操作的最佳方法,以便我可以在另一个代码上实现它。所以这个过程应该在五分钟后增加。我知道我可以使用线程来做到这一点,但现在不知道如何实现这一点。我知道这是最好的方式How to run a console application on system Startup , without appearing it on display(background process)?这在后台运行,但我怎么会有五个分钟为增量如何在后台连续运行c#控制台应用程序
class Program
{
static void Main(string[] args)
{
Console.Write("hellow world");
Console.ReadLine();
}
}
如果应用程序中没有输出,则应考虑创建服务。 –
如果应用程序中没有输出,为什么写了'Console.Write'? –
这是相同的问题http://stackoverflow.com/questions/2686289/how-to-run-a-net-console-app-in-the-background –