douxiong2738 2016-11-14 17:59
浏览 64
已采纳

SSH2 PHP扩展(用于创建CRON作业)是否也适用于Windows?

I want to follow this tutorial to learn about creating CRON jobs in PHP.

Two things:

  1. I am working on a Windows Machine. But the tutorial says,

    The cronTab, or "Cron Table", is a Linux system process / daemon which facilitates the scheduling of repetitive tasks thereby easing up our day to day routine.

    So does this mean that it will Not work on Windows machines?

  2. I have read that SSH2 is only available for PHP versions which are older than PHP 7.0.

    I currently have PHP 7.0 So the question is that should I downgrade my PHP (that is uninstall this version and install PHP 5.6) to use this extension.

My ultimate purpose to create a CRON job to keep monitoring a directory for the presence of a certain type of files. When a file is found, it is opened and useful data is extracted from it and loaded into the database.

  • 写回答

1条回答 默认 最新

  • douyingp82418 2016-11-14 18:14
    关注
    1. cron is the Linux scheduled task. Windows has Task Scheduler you can use instead, to run your scripts on a schedule
    2. SSH2 is a PECL extension. You'll note there is a precompiled DLL for Windows listed. Be sure to install 1.0

      ssh2 1.0 and above is PHP 7 only

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘