It was decided to try and create web pages with an expiring date. The idea is when a web page has been up for a year, the unit that is responsible for the content of that web page will receive a notice that this web page has been up for a year and to please and check if the information is still valid. They have a chance to view the content and decide if the page can stay for another year or whatever is decided. So I created a meta tag with the expiring date. I have a simple script to check for the expiring date.
Each time the page is loaded onto a browser the script runs and sends an email each time. No one wants to get all these email. I need the email sent only once to the team responsible for the content and to our team. I would like to it to run once a day for three days.
Any suggestion would greatly appreciated, thanks for your help.
04-07-2014, 09:19 AM
Why not have a control person in your IT unit that logs each page/script into a db and records the last time that updates were made. Then you monitor that db to check what scripts are coming up on a predetermined time-elapsed value and print a report.
This avoids the emails, the effort to place some new logic into existing code, and allows for a single control point as well as variable expire dates should that be necessary.
date last updated
(a value that represents the lifetime of this script before it requires review)
responsible unit (?)
Then you have a cron task that queries this table looking for any records that the date last update + the time value that calculates out to an upcoming expiration that is within your desired window.
04-16-2014, 08:06 AM
My apologies for not replying sooner, away on personal business.
Thanks very much for your help it is much appreciated.
It would be nice to do things using a database, but, the IT people wont allow us, because of security reasons.
I know I know!!
I was wondering if I can use session to accomplish what I need I do.
I tried a few script using session but so far no results.