centos下使用crontab执行php定时任务

来源:互联网 发布:测试手机信号强度软件 编辑:程序博客网 时间:2024/05/16 19:54

1. 编辑/var/spool/cron下的root文件

2. 添加一行, 每一分钟请求一次http://localhost/1.php

    */1  * * * * /usr/bin/curl http://localhost/1.php
3. 重启crond服务

    service crond restart



0 0