简体   繁体   English

我可以为localhost配置cron作业

[英]can i configure cron job for localhost

it's a one line question and i don't know how to describe it 这是一个单行问题,我不知道如何描述它

mysystem config:-

os: windows Xp
server : Wamp server (latest)

is this posible ? 这是真的吗?

Cron is a time-based job scheduler in Unix-like computer operating systems. Cron是类Unix计算机操作系统中基于时间的作业调度程序。 Which means you can not configure it on Windows. 这意味着您无法在Windows上进行配置。

Yes you can, 是的你可以,

simply go to task scheduler in windows 只需转到Windows中的任务调度程序

create a new task 1. in the actions tab, navigate to the exe file of any web browser you have installed on your system 2. in the arguments textbox, type the url to the script you wish to execute (eg localhost/mysite/cron.php). 创建新任务1.在操作选项卡中,导航到系统上安装的任何Web浏览器的exe文件2.在参数文本框中,键入要执行的脚本的URL(例如localhost / mysite / cron) .PHP)。

This should start the browser automatically and run your php file 这应该自动启动浏览器并运行您的php文件

Windows does have the at scheduler, which is pretty easy to use. Windows 确实at scheduler,它很容易使用。 Not as nice as cron for scheduling repeating tasks, last I looked at it, but it was easy. 不像cron安排重复任务,最后我看了一下,但很容易。

Windows 7 has a scheduled tasks framework . Windows 7具有计划任务框架 It might be able to do what you need. 它可能能够做你需要的。 It seemed pretty complicated to me, but it might be perfect. 这对我来说似乎很复杂,但它可能是完美的。

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

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