note 56801 added to class.com

From: Date: Thu, 15 Sep 2005 14:36:45 +0000
Subject: note 56801 added to class.com
Groups: php.notes 
Request: Send a blank email to php-notes+get-95228@lists.php.net to get a copy of this message
If you can get the old "TaskScheduler.dll" and register it, it is quite simple to handle and start Windows tasks from PHP. This is extremely useful when you got things to do which must be run in a different user context. Prepare a task with the user and use PHP & Com to build a webinterface for it. Here is an example how to start a Windows task: function start_task ($taskname) { $SchedObj = new COM("Scheduler.SchedulingAgent.1"); foreach ($SchedObj->Tasks as $task) { if (strtolower( (string) $task) == strtolower( $taskname.".job" )) { $task->Run(); } } } I'm also working on a class to handle infos, adding and removing of tasks via PHP. If you are interested drop me a line. ---- Manual Page -- http://www.php.net/manual/en/class.com.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+56801 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56801&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56801&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56801&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56801&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56801&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+56801&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56801&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+56801&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#95228) next »