How do I run a PHP script using windows schedule task?

后端 未结 12 1346
梦谈多话
梦谈多话 2020-11-27 02:46

I have installed localhost/server in my machine and I need to run a php script using windows schedule task. how do I add path in \"Actions\" tab in schedule task / cofigure

12条回答
  •  醉话见心
    2020-11-27 03:02

    create Schedule task Scheduler->Actions->Edit Action

    if you have php file

    Program/script: powershell 
    Add arguments: curl http://localhost/demo/cron.php
    

    if you have MVC/CMS URL

    Program/script: powershell
    Add arguments: curl http://localhost/demo/controller/method
    

提交回复
热议问题