语言指定SchTasks.exe会day参数独立的方式 [英] Language independent way to specify day parameter for schtasks.exe
问题描述
我想一个新的任务添加到Windows任务调度程序与 SchTasks.exe会
。我现在遇到的问题是指定在该任务运行的一周中的一天。
I'm trying to add a new task to the Windows Tasks Scheduler with schtasks.exe
. The problem I'm having now is to specify the day of the week at which the task should run.
这是我能找到那个愚蠢的计划坚持获得该参数作为当天的名字缩写字符串 - 本地化操作系统的语言
From what I could find out that stupid program insists on getting that argument as string abbreviation of the day name - localized to the OS language.
其他参数接受英文字符串得很好,但在德语系统上提供SUN不工作。我怎样才能解决呢?
Other parameters accepted the English strings just fine but supplying "SUN" on a German system doesn't work. How can I work around that?
如果它只是配套的情侣语言的应用程序运行在翻译不会是坏的问题。但这种方式我期待每一种语言工具的该工具进来...
If it were just an issue of supporting the couple of languages the application is translated in that wouldn't be bad. But this way I have to expect EVERY language that tool of a tool comes in...
我工作在C#顺便说一句...
I'm working in c# btw...
推荐答案
您可以在一周中的每一天去(开始与2012年3月4日,这是一个星期天,往前走,直到周六,3月10日)和格式使用 DDD
格式(短日名称)的日期。这样,你会得到所有7天的短名称,根据您的语言环境。
You could go over all days of the week (start with March 4th 2012, which is a Sunday, and move forward until Saturday, March 10th) and format that date using the ddd
format (short day name). That way you'll get all 7 short day names, based on your locale.
这篇关于语言指定SchTasks.exe会day参数独立的方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!