douyong1908 2013-11-08 23:09
浏览 79

Cron Job - 如何在特定日期之间执行两次脚本?

I am new to php and database stuff, but have looked around and cannot find a solution.

What I'm trying to accomplish:

I have a slideshow of images. The images come from Flickr's API, stored in a database table, then the database data is generated into a JSON link.

My question is, is there a way to execute the php script that calls the flickr API everytime the slideshow circle through all the images in the JSON link? I could specify every 1 minutes, but that may be too long if there are only a few images in the slideshow.

If you can't do that,

is there a way to execute the script every 1 minute on only fridays from 9pm EST to 3am EST?

  • 写回答

4条回答 默认 最新

  • duanbei7005 2013-11-08 23:15
    关注

    The answer is yes there is a way but how all depends on the slideshow you are using. If you didn't build it i would hunt for a function that's probably running at the end of the slideshow to trigger it to loop to the beginning. When you find that function you can alter it to run the script that connects to the API to get new images.

    You might have to delay the loop in the slideshow long enough for the new images to load.

    评论

报告相同问题?

悬赏问题

  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法