How to return windows scheduled task list with php
I need a what for PHP to return all of Windows' (XP) Scheduled Tasks - is this possible? I'm creating a scheduling script and the user needs to be able to view what time slots are 开发者_StackOverflow中文版already occupied.
This looks promising http://codesnob.wordpress.com/2009/05/18/displaying-windows-task-scheduler-tasks-with-php/
Also, http://msdn.microsoft.com/en-us/library/aa383448%28VS.85%29.aspx
And finally, http://www.php.net/manual/en/class.com.php
EDIT
I just ran a test my self and this worked. 32-bit Windows, Zend Server
$com = new com("Schedule.Service");
$com->Connect();
$oFolder = $com->GetFolder("\\");
$oCollection = $oFolder->GetTasks(0);
print "Count: " . $oCollection->Count . "n";
for ($i = 1; $i <= $oCollection->Count; $i++)
{
echo $oCollection ->Item($i)->Name ;
}
精彩评论