By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,526 Members | 2,189 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,526 IT Pros & Developers. It's quick & easy.

Dotnet scheduler like the Windows "Schedued Tasks" scheduler?

P: n/a
Hi,

I am writing an App in .Net that involves some scheduling of tasks. I was
wondering if anybody has come accross any components or examples of how to
implement a schedule manager like the one in the Task Scheduler for Windows?

Basically I'm after something that'll allow me to specify a "recurring" or
"once off" schedule with advanced options like "the first monday in the
month" etc.

I could go ahead and write my own, but a wee voice keeps whispering the
words "Code Reuse" and "go on, be lazy" ;)

If I can't find anything that is of any use, I'll go ahead and write my own.
If anybody else is interested in a reusable component like this, let me know
your ideas and I'll take them into account when writing it. Being close to
Christmas and all that, I might even post the finished code ;)

Cheers for the help.

Trev.


Jul 21 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a

"Codemonkey" <hu*********@hotmail.com> wrote in message
news:uo**************@TK2MSFTNGP11.phx.gbl...
Hi,

I am writing an App in .Net that involves some scheduling of tasks. I was
wondering if anybody has come accross any components or examples of how to
implement a schedule manager like the one in the Task Scheduler for Windows?
Basically I'm after something that'll allow me to specify a "recurring" or
"once off" schedule with advanced options like "the first monday in the
month" etc.

I could go ahead and write my own, but a wee voice keeps whispering the
words "Code Reuse" and "go on, be lazy" ;)

If I can't find anything that is of any use, I'll go ahead and write my own. If anybody else is interested in a reusable component like this, let me know your ideas and I'll take them into account when writing it. Being close to
Christmas and all that, I might even post the finished code ;)


Just use the windows one:
http://www.msjogren.net/dotnet/eng/samples/misc.asp
http://www.codeproject.com/csharp/ta...lerlibrary.asp
http://www.codeproject.com/csharp/TSNewLib.asp
Jul 21 '05 #2

P: n/a

In addition, I've seen this example that wraps the windows Task Scheduler
API:

http://www.codeproject.com/csharp/TSNewLib.asp

But I'd be more interested in one that is a little bit more "self-contained"
(i.e. doesn't create Tasks in the Control Panel - even hidden ones.)
Jul 21 '05 #3

P: n/a
Thanks. I seen these and forgot to mention them in my first post. Although
it's pretty much exactly what I need, I'd like a self contained one (as
explained in my other post)

Cheers anyway.

Trev.
Jul 21 '05 #4

P: n/a
Hello Trev,

Thanks for your post. As I understand, you want to create a Scheduled Tasks
of your own. Please correct me if there is any misunderstanding. I now
share the following information with you:

Windows has a services named "Task Scheduler" which enables a user to
configure and schedule automated tasks. That is, it is this service that is
responsible for running programs at their scheduled times. I suggest that
you can also create a Windows Service which runs at background, monitors
the time, and launches the appropriate tasks. Please refer to the following
MSDN article for detailed information on .NET Windows Service Application:

Introduction to Windows Service Applications
http://msdn.microsoft.com/library/de...us/vbcon/html/
vbconintroductiontontserviceapplications.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #5

P: n/a
Thanks for the help. I don't think I'll need to go as far as writing a
service to host the Task Scheduling abilities that I need at the moment.

Here's my idea so far:

1) .net Class library that mimics the Windows Task Scheduler (with Task and
Trigger objects etc.)

2) This library can be hosted by any application (Windows Forms or Windows
Service etc.)

3) The settings for each task and schedule are saved along with the other
settings for the application that hosts it (removes the need for ".job"
files to be created)

4) Tasks are only triggered if the host application is running. This is fine
as most tasks will be related internally to the application itself.

Let me know if anybody has anything to add to this,

Thanks again for your help,
Trev.

"Tian Min Huang" <ti******@online.microsoft.com> wrote in message
news:C6**************@cpmsftngxa07.phx.gbl...
Hello Trev,

Thanks for your post. As I understand, you want to create a Scheduled Tasks of your own. Please correct me if there is any misunderstanding. I now
share the following information with you:

Windows has a services named "Task Scheduler" which enables a user to
configure and schedule automated tasks. That is, it is this service that is responsible for running programs at their scheduled times. I suggest that
you can also create a Windows Service which runs at background, monitors
the time, and launches the appropriate tasks. Please refer to the following MSDN article for detailed information on .NET Windows Service Application:

Introduction to Windows Service Applications
http://msdn.microsoft.com/library/de...us/vbcon/html/ vbconintroductiontontserviceapplications.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #6

P: n/a
hi, ive written a class in vb.net that does exactly what your looking for..
it contains almost all of the functionality that can be found in the Outlook
Appointment Recurrence option :-)


"Codemonkey" <hu*********@hotmail.com> wrote in message
news:um**************@TK2MSFTNGP10.phx.gbl...

In addition, I've seen this example that wraps the windows Task Scheduler
API:

http://www.codeproject.com/csharp/TSNewLib.asp

But I'd be more interested in one that is a little bit more "self-contained" (i.e. doesn't create Tasks in the Control Panel - even hidden ones.)

Jul 21 '05 #7

P: n/a
> hi, ive written a class in vb.net that does exactly what your
looking for


Nice one.

For the sake of saving me (and a few others who might need this
functionality in the future), would you consider sharing the code?

When I do get around to writing my own (if I have to), I was planning to
post an article on CodeProject (http://www.codeproject.com).

If you don't fancy sharing the code, never worry. I'm sure I'll be bored of
watching Christmas films over the holidays that I might get around to doing
it (Cough.... Nerd.... Cough...) ;)

Trev.

Jul 21 '05 #8

P: n/a
Hi,

Thanks for your information. Basically, I suggest that you can create a
Timer for each scheduled task, when a specified number of time units elapse
you can call Process.Start to start the task.

Process.Start Method (String)
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemdiagnosticsprocessclassstarttopic3.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #9

P: n/a
Thanks for the info. It'll come in handy when it comes to writing the
application.

Trev.

"Tian Min Huang" <ti******@online.microsoft.com> wrote in message
news:3W****************@cpmsftngxa07.phx.gbl...
Hi,

Thanks for your information. Basically, I suggest that you can create a
Timer for each scheduled task, when a specified number of time units elapse you can call Process.Start to start the task.

Process.Start Method (String)
http://msdn.microsoft.com/library/de...us/cpref/html/ frlrfsystemdiagnosticsprocessclassstarttopic3.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #10

P: n/a
Hi mate, i would but i cant supply the code due to contractual terms layed
out in my contract ( i wrote it at work ya see)... the way it goes I guess..

it was too difficult.. if wanna ask any questions tho, then feel free to
ask..

j
"Codemonkey" <hu*********@hotmail.com> wrote in message
news:#R**************@TK2MSFTNGP10.phx.gbl...
hi, ive written a class in vb.net that does exactly what your
looking for
Nice one.

For the sake of saving me (and a few others who might need this
functionality in the future), would you consider sharing the code?

When I do get around to writing my own (if I have to), I was planning to
post an article on CodeProject (http://www.codeproject.com).

If you don't fancy sharing the code, never worry. I'm sure I'll be bored

of watching Christmas films over the holidays that I might get around to doing it (Cough.... Nerd.... Cough...) ;)

Trev.


Jul 21 '05 #11

P: n/a
Cheers J, I thought you were just teasing us ;)

I'll let you know how I get on (If I do go ahead and write it)

Trev.

"jmag" <ja***@maguire79.fsnet.co.uk> wrote in message
news:ux**************@tk2msftngp13.phx.gbl...
Hi mate, i would but i cant supply the code due to contractual terms layed
out in my contract ( i wrote it at work ya see)... the way it goes I guess..
it was too difficult.. if wanna ask any questions tho, then feel free to
ask..

j
"Codemonkey" <hu*********@hotmail.com> wrote in message
news:#R**************@TK2MSFTNGP10.phx.gbl...
hi, ive written a class in vb.net that does exactly what your
looking for


Nice one.

For the sake of saving me (and a few others who might need this
functionality in the future), would you consider sharing the code?

When I do get around to writing my own (if I have to), I was planning to
post an article on CodeProject (http://www.codeproject.com).

If you don't fancy sharing the code, never worry. I'm sure I'll be bored

of
watching Christmas films over the holidays that I might get around to

doing
it (Cough.... Nerd.... Cough...) ;)

Trev.



Jul 21 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.