doutucui0133 2013-08-14 23:07
浏览 22

我怎么用cron?

How reload a php script every 1-5seconds in cron ? Would not it be better to use System_Daemon to reload the php script? I have Debian System.

  • 写回答

1条回答 默认 最新

  • dongtaijiao7140 2013-08-14 23:13
    关注
    • You can't really do this with cron, but instead you could write a script (either shell or php) that would loop forever and do something every X seconds.

    • In addition, make a crontab entry that would run every Y minutes and launch that script (if it's still not running). You can do the latter using a pid file that your script creates (read the pid and check if there is a process with that id).

      This check can also be internal within the script - so that when the script is started more than once, it would check if another copy alrady running

    评论

报告相同问题?

悬赏问题

  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题