airbasic
V2EX  ›  问与答

做了一个程序 bestflight.top 话说后台自动监控功能怎样实现最好

  •  
  •   airbasic · May 29, 2015 · 2878 views
    This topic created in 4026 days ago, the information mentioned may be changed or developed.

    最近闲得无聊写了个小程序,http://bestflight.top
    可以帮助想购买某个时间机票的人实时监控机票价格并且推送最低价格给他们。
    http://bestflight.top/index.php
    平时也没怎么编程,先不说我乱七八糟的代码了,好歹功能实现了,然而后台监控功能我是这么写的

    exec("bash xxx.sh aaa bbb ccc") 把参数传送到一个sh中
    sh写个sleep 600延时
    然后在php xxx.php
    xxx.php负责监控票价以及推送功能

    功能是实现了,但总觉得这是一个非常浪费资源的办法。
    第一次接触..所以来问问

    1 replies    2015-05-29 15:46:33 +08:00
    kslr
        1
    kslr  
       May 29, 2015
    crontab
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2736 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 02:41 · PVG 10:41 · LAX 19:41 · JFK 22:41
    ♥ Do have faith in what you're doing.