doubanduo7620 2014-05-10 18:20
浏览 42

在共享主机上的特定时间执行PHP脚本

I'm testing with a PHP script which has a an array of dynamic time table (times will change each day accordingly). What this script does is that, whenever one of these times matches the array, it will send out a tweet to a specific twitter account using its defined API keys. But it happens manually as I have to access the php file each time to match both array and server time. If explain more;

Example: If array A = 12:00pm & if I access the PHP file when the current server time matches the array (if also 12:00pm), it will post a tweet.

I don't want to check this array always and run php file each time just to send a tweet. Also, when I check with my hosting to run a cronjob they says the minimum time is 15 minutes, as that is a restriction for shared hosting. Is there any other solution which I can go for??

P.S.: I did not post any of those scripts as it works perfectly but the only problem is executing it. If there are any other fixes where you will be needing to see the codes. I can post it in here.

Thanks in advance.

  • 写回答

2条回答 默认 最新

  • dpir3950 2014-05-10 18:30
    关注

    shared server will normally limit the number and time interval for execution of cron. This is normal. Try to find out for a dedicated server which allow more cron

    评论

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大