通过Windows任务scheduller调度控制器方法 [英] Scheduling a controller method by Windows task scheduller
问题描述
我按照本教程( http://amitdhamu.com/ blog / automating-php-using-task-scheduler / )来调度PHP Codeignitre中的任务,但是在上述教程的第1步中,我不知道如何传递控制器方法而不是一个完整的php文件? !请在这方面帮助我吗?
I'm following this tutorial (http://amitdhamu.com/blog/automating-php-using-task-scheduler/) to schedule a task in PHP Codeignitre, however in step 1 of the mentioned tutorial I dont know how I can pass the controller method instead of a whole php file?! Could you please help me in this regard?
此外,我还需要为我的web应用程序的管理员提供调度选项,以便他们可以更改调度器有什么办法可以通过PHP的任务管理器选项?
Also I need to provide the option of scheduling for the admin of my web application as well in a way that they can change the scheduleer; is there any way that I can pass the task manager options with PHP?
如果我的问题不清楚,请让我知道你需要更多的澄清
Please if my question is not clear, please let me know which part you need more clarification
PS:我有一个Windows服务器!
PS: I have a windows server!
感谢
推荐答案
如果要从日程表中执行CodeIgniter代码,请替换
If you want to execute CodeIgniter code from schedule, replace the call, in .bat:
中的调用:
php C:\Apache\htdocs\automatic.php
至:
php C:\Apache\htdocs\index.php myController <myMethod> <arg1> <arg2>
示例:
php C:\Apache\htdocs\index.php users update
这篇关于通过Windows任务scheduller调度控制器方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!