Windows Schedule

  • Thread starter Thread starter PawelR
  • Start date Start date
P

PawelR

Hello group,
Sorry, My English is very little.
I have qustion about windows scheduler.
My application create report and send this report to users. I want run this
application as job in windows scheduler. In every day of week time to run
create report is different (ex. Monday 7:00 pm, Thusday 7:30 am etc.)
How form my application add new job to windows scheduler and remove same
job?
How managment job is scheduler?
Maybe sombody have another idea?

Thx
PawelR
 
Why would you write a program to do this, just create the job from the
commandline (using schtasks.exe on XP and W2K3, at.exe on other).
When you really need to do this from your program you can simply use
Process.Start to create the job. Note that only administrators, power users
and backup operators can schedule tasks like this.

Willy.
 
Thanks,
But this not full good idea because, how read shedules?
Do you thing about parse cmd?


PawelR
 
Hello group,
Sorry, My English is very little.
I have qustion about windows scheduler.
My application create report and send this report to users. I want run this
application as job in windows scheduler. In every day of week time to run
create report is different (ex. Monday 7:00 pm, Thusday 7:30 am etc.)
How form my application add new job to windows scheduler and remove same
job?
How managment job is scheduler?
Maybe sombody have another idea?

Thx
PawelR

Please read Mr. David Hall's article on CodeProject.
http://www.codeproject.com/csharp/TSNewLib.asp

// Anders
 
If I understand you correctly, your application will create a report but you
don't want to run it immediately.

I would search to see if there is an interface (Automation, or WMI probably)
to the scheduler, however, you may have problems accessing the scheduler
unless the user running your app has sufficient privileges.

Personally I would think about creating a Windows Service to run on the same
machine and just send it a message via Remoting and let it handle running
the report. In the long run it would probably give you a lot more control
and flexibility.

--Bob
 
Thanx Bob

You andersand me correctly,
Maybe I use windows services, but I never created this type of application
:) and I have short time to run this application.

PawelR
 
Back
Top