开发者

Display time a cron job pulled data from a remote server

开发者 https://www.devze.com 2023-03-28 10:16 出处:网络
I request XML information from a remote server every few minutes or so with a cron job. I store that information in a database, and then a s开发者_运维百科eparate file queries the database to display

I request XML information from a remote server every few minutes or so with a cron job. I store that information in a database, and then a s开发者_运维百科eparate file queries the database to display the information on a website. How can I display the exact time of the most recent update (as in the last time the cron job successfully ran the script which pulls the data from the remote server)?


Write the date in some file by calling date('Y-m-d H:i:s') in your cron script. Then read the file with your display script.

0

精彩评论

暂无评论...
验证码 换一张
取 消