Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/286.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
管理多个PHP脚本的启动和关闭_Php_Batch File_Automation - Fatal编程技术网

管理多个PHP脚本的启动和关闭

管理多个PHP脚本的启动和关闭,php,batch-file,automation,Php,Batch File,Automation,在白天的特定时间自动运行多个PHP脚本,然后在晚上的特定时间关闭它们,首选的方法是什么?示例:10:00自动启动script1.php,20:00自动关闭它 我正在使用Windows Server 2012,目前正在使用计划任务来启动脚本,但我没有合适的方法来关闭特定的PHP进程或脚本,我可以根据PID关闭随机进程或脚本 是否有一些程序可以用于此目的?您可以让脚本自行退出。我猜你的脚本中运行了某种循环——在该循环中,检查当前时间——如果它在你想要的“停止”时间之后,退出

在白天的特定时间自动运行多个PHP脚本,然后在晚上的特定时间关闭它们,首选的方法是什么?示例:10:00自动启动script1.php,20:00自动关闭它

我正在使用Windows Server 2012,目前正在使用计划任务来启动脚本,但我没有合适的方法来关闭特定的PHP进程或脚本,我可以根据PID关闭随机进程或脚本


是否有一些程序可以用于此目的?

您可以让脚本自行退出。我猜你的脚本中运行了某种循环——在该循环中,检查当前时间——如果它在你想要的“停止”时间之后,退出