On Tue, Jun 8, 2010 at 05:18, Amit Saxena <learn.tech...@gmail.com> wrote: > Hi all, > > I want to know how to find the status, i.e. "next run time" and "last run > time", of a task which is run through windows task scheduler. > > This is required so as to find out instances where a task gets "hanged" > after run through windows task scheduler. > > Thanks & Regards, > Amit Saxena >
Take a look at [Win32::TaskScheduler's] [GetNextRunTime][2] and [GetMostRecentRunTime][3]. If I understand your problem, the UNIXy solution is to create a pid file (a file that contains the process id of the program) when you start and remove it when you end. If a pid file exists when you start, that means that the lsat process either died prematurely and needs to be cleaned up after or it is still running. [1] : http://search.cpan.org/dist/Win32-TaskScheduler/TaskScheduler.pm [2] : http://tinyurl.com/25rrwcr [3] : http://tinyurl.com/2b5vtwm -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/