任务计划程序中的控制台应用参数 [英] Console app arguments from Task Scheduler
本文介绍了任务计划程序中的控制台应用参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我有一个控制台应用程序,我作为一个任务运行,我需要传递一个参数给它。是否有任何解决方法要做这来自任务调度程序?
提前致谢!
Hello all,
I have a console application which i run as a task,and i need to pass a parameter to it.Is there any workaround to do this from the task scheduler?
Thanks in advance!
推荐答案
Hi
我认为您可以在应用程序主方法中读取任务计划程序中的参数。
例如。
Hi
I think you can read the arguments from your Task Scheduler in your application main method.
For Example.
[STAThread]
static void Main(string[] yourArgs)
{
yourArgs[0] // "your first argument";
yourArgs[1] // "your second argument";
}
嗨
在任务计划程序中,您可以指定命令行参数。转到任务计划程序 - >双击您的任务 - >转到''操作'' - >选择你的行动 - > ''编辑'' - > ''添加Argumenets''。您可以在应用程序启动时阅读。
Hi
In task scheduler, you can specify the command line arguments. Go to task scheduler -> double click on your task --> Go to ''Actions'' --> Select your action --> ''Edit'' --> ''Add Argumenets''. This you can read in your application start up.
这篇关于任务计划程序中的控制台应用参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文