使用C#的任务计划程序(计划.bat(批处理)文件) [英] Task Scheduler using C# (To Schedule .bat(batch) file)

查看:231
本文介绍了使用C#的任务计划程序(计划.bat(批处理)文件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨Frenz !!





我想用C#创建一个任务调度程序,与Windows任务调度程序相同,运行我的。特定时间的bat(批处理)文件。



我在下面找到了有用的链接( TaskScheduler [ ^ ])



这个他们安排触发器,我想安排我的.bat文件

我的意思是当我试图给我的批处理文件路径在标签文本框中,它刚刚触发了触发器,没有运行我的批处理文件

所以,我修改了一点代码,现在我也可以运行我的批处理文件,



但是,当我关闭我的应用程序触发也停止,

所以,即使我关闭我的应用程序li​​ks窗口,我有什么办法可以触发或运行我的批处理文件任务安排程序???









亲切帮助我。



注意:它的桌面应用程序使用C#

Hi Frenz!!


I want to create one Task Scheduler using C# same as Windows Task Scheduler, to run my .bat (batch) file on particular time.

I found below useful link (TaskScheduler[^])

in this they schedule trigger, and i want to Schedule my .bat file
I mean while i am trying to give my batch file path in tags textbox, its just fired trigger, not run my batch file
so, i modify that code little bit, and now I am able to run my batch file also,

but, when i close my application triggering also stop,
so, is there any way i can triggering or run my batch file even if i close my application liks window task scheduler???




kindly Help me .

Note: its desktop application using C#

推荐答案

查看 的Process.Start 方法 [ ^ ]。


这篇关于使用C#的任务计划程序(计划.bat(批处理)文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆