dongxiang3648 2018-06-08 08:01
浏览 92

Linux中的Cron工作用于运行php文件

I have an php file to create a new text file . That has to run in every minute . I stored that file on /var/www/html/cron.php . Also i had done in command prompt

crontab -e

edit the file like

* * * * * /var/www/html/cron.php

But still cron not working on localhost

  • 写回答

3条回答 默认 最新

  • dongpaozhi5734 2018-06-08 08:06
    关注

    The command you put in crontab should be something like:

    */10 * * * *   /usr/bin/php  /var/www/html/cron.php
    

    Where /usr/bin/php is an example path to your php binary.

    You can find out your php binary with:

    whereis php
    
    评论

报告相同问题?

悬赏问题

  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 关于#python#的问题:自动化测试