pop up the windows task scheduler in .net application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear All,

How can I pop up the windows task scheduler inside of my .net application?
Such as I have a button called Schedule Now, after clicking it, the Add
Scheduled Task window will pop up, just like clicking from Control Panel ->
Scheduled Task -> Add Scheduled Task. Appreciate ahead for any of your
suggestions. Thanks.
 
Eric,

That is a cool application. But the task it scheduled can't be running
automatically since the next run time for the scheduled task is always
"Never". Any ideas for that. Appreciate so much for your help.

Christina
 
I wrote an article on that topic last august (www.utmag.com) and I found
that problem and a solution. Here is an extract of this artcle:

The "Add New" button and the "Properties" button launch Windows Scheduler
dialog to which you are already used. There is a small glitch with the "Add
New" button: the task will never start! It seems that the wrapper forgot one
property. The newly added task can be run without problem but will not start
when scheduled. Watch Eduardo's website as he may post a fix for that.

Meanwhile, I found a workaround to that. If you specify flags (and an end
date) when you add a new task, the task get scheduled correctly:

' Add a m_TaskScheduler
With .Triggers.Add()
.TriggerType = Trigger.Types.Daily
.BeginDay = Date.Today
.StartTime = Now
.Flags = Trigger.TriggerFlags.HasEndDate
.EndDay = Date.Parse("9999/12/31")
End With

--

HTH

Éric Moreau
MCSD, Visual Developer - Visual Basic MVP
(http://aspnet2.com/mvp.ashx?EricMoreau)
Conseiller Principal / Senior Consultant
Concept S2i inc.(www.s2i.com)
 
Back
Top