简体   繁体   English

使用php计划任务从mssql中提取

[英]extract from mssql using php scheduled task

I need to execute a scheduled task each minute that performs data extraction from MS Server. 我需要每分钟执行一次计划的任务,以执行从MS Server提取数据的任务。 Yet trying with bat script the php, would cause errors not recognizing sqlsrv functions 但是尝试使用bat脚本php会导致无法识别sqlsrv函数的错误

here is the content of the bat file: 这是bat文件的内容:

cd C:\wamp\bin\php\php5.3.13
PHP C:\wamp\www\bin\Scripts\MinutelyScript.php

the MinutelyScript.php file works fine if executed from the server. 如果从服务器执行,则MinutelyScript.php文件可以正常工作。 Please help me :) 请帮我 :)

Add this to your batch file 将此添加到您的批处理文件

//path to your website
cd \wamp\www\yourwebsite

c:\wamp\bin\php\php5.3.5\php-cgi.exe -c  c:\wamp\bin\php\php5.3.5\php.ini -f cronfile.php

"cronfile.php" if file is at root folder if it is inner folder give path from root folder 如果文件位于根文件夹中,则为“ cronfile.php”;如果文件位于内部文件夹中,则提供根文件夹的路径

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM