Question Windows task scheduler

sweetypaul

New member
Joined
Mar 17, 2012
Messages
1
Programming Experience
3-5
Hi,

After the scheduled run of any application (windows task scheduler)I want to get this task name and export it to the database.

Please provide me a solution
 
I'm not really sure that there is one. As far as I'm aware the Task Scheduler doesn't provide notifications. Also, I believe that history is disabled by default. You could perhaps check out the Windows logs to see if Task Scheduler makes entires there and then query that, but that would be pull rather than push and I'm not even sure such log entires exist. Maybe you're best option would be to go through every scheduled task and add an extra action to run a simple Console app of yours that will add an entry to your database. Task Scheduler provides a commandline interface that you can automate using Process.Start in VB code. It's named "schtasks" and you can find information on its use in Windows Help.
 
Back
Top