Mun
Mun

Reputation: 14308

Get last run date of task in Windows Scheduled Tasks from ASP.NET

Is it possible to get the last run date of a scheduled task in Windows Scheduled Tasks from ASP.NET?

Ideally, it would be good to be able to list, start and stop these tasks as well, though at this stage, the main thing I'd like to do is retrieve the last run time for a specific scheduled task.

If this is not possible, my workaround is to simply have the application being run update the database or XML file with it's last run date, but as this information is already stored in Scheduled Tasks, I was wondering if it might just be easier to read the data straight from there.

Upvotes: 3

Views: 2944

Answers (1)

Eduardo Molteni
Eduardo Molteni

Reputation: 39413

Use the Task Scheduler Managed Wrapper 1.2 ( Free Download ) and then use the Task.LastRunTime Property

Upvotes: 1

Related Questions