Jane
Jane

Reputation: 997

Display time a cron job pulled data from a remote server

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 separate 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)?

Upvotes: 0

Views: 197

Answers (1)

kgilden
kgilden

Reputation: 10356

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.

Upvotes: 1

Related Questions