有什么方法可以输入命令来删除具有特定模式的所有计划任务?
我有一个作业,它使用如下字符串创建计划任务:RunOnce072000,其中 072000 是创建计划任务的时间。我需要通过命令行删除计划任务,但无法找到使用通配符执行删除的方法。 有人有什么想法吗?
I have a job which creates a scheduled task with a string like this: RunOnce072000, where 072000 is the time the scheduled task was created. I need to delete the scheduled task by command line but cannot figure out a way to use a wildcard to perform the delete.
Has anyone got any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您使用的是 Windows dos 提示符,如果您可以使用“at”(它不会将名称与作业关联起来),您肯定会运行:
因此也许使用 for 循环可以解决您的问题:
注意引号,如果 at-ed 命令没有参数,则“at”将删除,并删除已翻译的错误状态(那里是法语)。
Assuming you are using a Windows dos prompt, if you can work with "at" (which doesn't associate names with jobs), you will certainly run:
So perhaps using a for loop would solve your problem:
Take care of the quotes, which "at" removes if there are no arguments to the at-ed command, and of the error state, which is translated (there, in french).