用于创建计划任务的VB.NET代码(.job) [英] VB.NET Code for creating a scheduled task (.job)

查看:82
本文介绍了用于创建计划任务的VB.NET代码(.job)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个程序,需要能够创建自定义.job文件

并将它们添加到计划任务文件夹中。我想知道的是,

.job文件的格式是什么?如何添加所有

数据以便完成任务可以正确运行吗?


如果这不是那么容易做的事情,那么说我需要某个部分

我的程序按计划执行。 ..如何编写一些

内部调度程序,该程序运行时不会占用大量CPU电量?

程序正在运行?


感谢您的任何建议。

I''m writing a program that needs to be able to create custom .job files
and add them to the scheduled tasks folder. What I''d like to know is,
what is the format of a .job file and how do I go about adding in all
the data so that the task could run correctly?

If that is something not so easy to do, then say I need a certain part
of my program to execute on a schedule... How do I go about writing some
internal scheduling routine that won''t utilize a lot of CPU power while
the program is running?

Thanks for any advice.

推荐答案

" Max" <毫安***** @ yahoo.com> schrieb
"Max" <ma*****@yahoo.com> schrieb
我正在编写一个程序,需要能够创建自定义.job
文件并将它们添加到计划任务文件夹中。我想知道的是,.job文件的格式是什么,我该如何添加所有数据以便任务可以正常运行?

如果这不是那么容易做的事情,那么说我需要一个程序的某个部分按计划执行...我该如何去编写一些内部调度程序程序运行时不会使用大量的CPU电源吗?

感谢您的任何建议。
I''m writing a program that needs to be able to create custom .job
files and add them to the scheduled tasks folder. What I''d like to
know is, what is the format of a .job file and how do I go about
adding in all the data so that the task could run correctly?

If that is something not so easy to do, then say I need a certain
part of my program to execute on a schedule... How do I go about
writing some internal scheduling routine that won''t utilize a lot of
CPU power while the program is running?

Thanks for any advice.




我只发现了这个...

http://msdn.microsoft.com/library/en...start_page.asp


....但不要知道如何在VB.Net中实现它。

-

Armin


如何引用及其原因:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html



I only found this one...

http://msdn.microsoft.com/library/en...start_page.asp

....but don''t know how to implement it in VB.Net.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html


文章< Rb ******************** @ comcast。 com>,Max写道:
In article <Rb********************@comcast.com>, Max wrote:
我正在编写一个程序,需要能够创建自定义.job文件
并将它们添加到计划任务文件夹中。我想知道的是,
.job文件的格式是什么?如何添加所有数据以使任务正常运行?

如果这不是那么容易做的事情,那么说我需要我的程序的某个部分按计划执行......我该如何编写一些
内部调度程序程序运行时不会消耗大量的CPU能力吗?

感谢您的任何建议。
I''m writing a program that needs to be able to create custom .job files
and add them to the scheduled tasks folder. What I''d like to know is,
what is the format of a .job file and how do I go about adding in all
the data so that the task could run correctly?

If that is something not so easy to do, then say I need a certain part
of my program to execute on a schedule... How do I go about writing some
internal scheduling routine that won''t utilize a lot of CPU power while
the program is running?

Thanks for any advice.




去获取 http://www.mtogden.com/ ~tom / files / Sc ... gAgent.NET.zip

这是我在初读C#时写的类库。

这可以从VB.NET调用。您只需将项目包含在

您的解决方案中并引用它。您可以在MSDN上查看任务调度程序

文档,以了解每个属性的用途。

可能有一些没有实现 - 但是从那以后你有

来源......


-

Tom Shelton [MVP]



Go and get http://www.mtogden.com/~tom/files/Sc...gAgent.NET.zip.
This is a class library I wrote while I was initialy playing with C#.
This is callable from VB.NET. You just need to include the project in
your solution and reference it. You can look at the task scheduler
documentation on MSDN to get an idea about what each property does.
There may be a couple that aren''t implemented - but since you have the
source...

--
Tom Shelton [MVP]


Tom Shelton写道:
Tom Shelton wrote:
文章< Rb ******************** @ comcast .com>,Max写道:

In article <Rb********************@comcast.com>, Max wrote:

我正在编写一个程序,需要能够创建自定义.job文件
并将它们添加到预定任务文件夹。我想知道的是,
.job文件的格式是什么?如何添加所有数据以使任务正常运行?

如果这不是那么容易做的事情,那么说我需要我的程序的某个部分按计划执行......我该如何编写一些
内部调度程序程序运行时不会消耗大量的CPU能力吗?

感谢您的任何建议。
I''m writing a program that needs to be able to create custom .job files
and add them to the scheduled tasks folder. What I''d like to know is,
what is the format of a .job file and how do I go about adding in all
the data so that the task could run correctly?

If that is something not so easy to do, then say I need a certain part
of my program to execute on a schedule... How do I go about writing some
internal scheduling routine that won''t utilize a lot of CPU power while
the program is running?

Thanks for any advice.



去获取 http://www.mtogden.com/ ~tom / files / Sc ... gAgent.NET.zip
这是我在初学C#时编写的类库。
这可以从VB.NET中调用。您只需将项目包含在您的解决方案中并引用它即可。你可以查看MSDN上的任务调度程序文档来了解每个属性的用途。
可能有一些没有实现 - 但是因为你有源代码来源...



Go and get http://www.mtogden.com/~tom/files/Sc...gAgent.NET.zip.
This is a class library I wrote while I was initialy playing with C#.
This is callable from VB.NET. You just need to include the project in
your solution and reference it. You can look at the task scheduler
documentation on MSDN to get an idea about what each property does.
There may be a couple that aren''t implemented - but since you have the
source...




好​​的,谢谢你,我会看看。然而,在快速看完
后,我无法弄清楚你用来写这些文件的内容。 VS.NET

不识别任何这些文件,只在文本模式下打开它们

(没有语法或类似的东西)。不认识

SchedulingAgent.csproj作为项目文件。我该怎么办?



Ok thanks for that, I''ll have a look. However, just after taking a quick
look I can''t figure out what you used to write those files. VS.NET
doesn''t recognize any of those files and only opens them in text mode
(no syntax or anything else like that). Doesn''t recognize
SchedulingAgent.csproj as a project file either. What do I do about this?


这篇关于用于创建计划任务的VB.NET代码(.job)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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