XAMPP 上的 Cron (windows)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1291835/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cron on XAMPP (windows)
提问by Nick Heiner
I am developing a site locally using xampp. I would like to configure cron, so the dev environment is the same as the production environment. However, my system is windows vista. Is there any way to do this, or am I forced to accept that my dev and production environments will be forks?
我正在使用 xampp 在本地开发一个站点。我想配置cron,所以dev环境和生产环境一样。但是,我的系统是windows vista。有什么办法可以做到这一点,还是我被迫接受我的开发和生产环境将是分叉的?
回答by TheJacobTaylor
I would highly recommend looking into Cygwin. I was using that when I wanted linux/unix utilities on Windows. It supports Cron as well.
我强烈建议您研究 Cygwin。当我想要在 Windows 上使用 linux/unix 实用程序时,我正在使用它。它也支持 Cron。
Jacob
雅各布
回答by crosenblum
Btw this is a really good question...there are a lot of good scheduled task apps out there. The 1 I liked is Visual Cron at http://www.visualcron.com/
顺便说一句,这是一个非常好的问题......那里有很多好的计划任务应用程序。我喜欢的 1 个是http://www.visualcron.com/ 上的Visual Cron
Running a scheduled task, is a very tough thing for web server/web apps to do...Because they have to check every x seconds or minutes to see if a task needs to be done, which can suck up cpu cycles for your web server/apps.
运行计划任务,对于网络服务器/网络应用程序来说是一件非常困难的事情......因为他们必须每隔 x 秒或分钟检查一次任务是否需要完成,这可能会占用您网络的 CPU 周期服务器/应用程序。
Which is why i prefer using an os based task scheduler or os task scheduling software, better performance I believe.
这就是为什么我更喜欢使用基于操作系统的任务调度程序或操作系统任务调度软件,我相信性能更好。
One trick that I had learned, was using php's -f command to create scheduled tasks without having to open a browser window, then it can run tasks...
我学到的一个技巧是使用 php 的 -f 命令创建计划任务,而无需打开浏览器窗口,然后它就可以运行任务......
On window's systems the only other way was opening up ie/firefox/opera whatever to run your web-based task..
在 Windows 系统上,唯一的另一种方法是打开 ie/firefox/opera 来运行基于 Web 的任务。
good luck!
祝你好运!
回答by Jeremy French
You could create a windows scheduled task to run cron.php (or call it in the browser).
您可以创建一个 Windows 计划任务来运行 cron.php(或在浏览器中调用它)。