Andy's Blog » php Windows 2008 定时执行, PHP windows定时任务能不能后台执行, bottlel3s » 让Windows完美定时运行PHP

让Windows完美定时运行PHP

Windows Scheduler PHP Extension

只要下载这个PHP扩展,安装上就OK啦

下载NTSchedule.zip

verifyntlogon() example

<?php
if (verifyntlogon("myusername","mypassword","mydomain") {
    
print "Verified!";
} else {
    
print "Verify Failed";
}
?>

task_add() example
Creates a task called "Example Task" that starts the windows calculator.

<?php
task_set_machine("mymachine","myusername","mypassword");
task_add("Example Task", "calc.exe");
?>

task_change_value() example
Changes the first task application to the windows calculator.

<?php
task_set_machine("mymachine","myusername","mypassword");
task_change_value(0,"application_name","calc.exe");
?>

task_count() example

<?php
task_set_machine("mymachine","myusername","mypassword");
print "Count: ".task_count();
?>

task_delete() example
Deletes the first task.

<?php
task_set_machine("mymachine","myusername","mypassword");
task_delete(0);
?>

更多的请看压缩包文档

Incoming search terms:

Tags: PHP, cron, cron job, Extension, sheduler

本文地址: http://www.21andy.com/new/20080531/1142.html

2 评论 to “PHP开源CMS之MODx”

  1. kevin 于 2008-09-25 23:52:29 发表:

    在windows xp/apache2.2.4/php5.2.5下使用php.ini加载该扩展时发生异常。

  2. longhtml 于 2010-02-22 12:47:11 发表:

    无法安装扩展,apache无法启动。