/    Sign up×
Community /Pin to ProfileBookmark

Hi

This is my first post.

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.

Cheers
Ren ?

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@ginerjmApr 07.2014 — 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.

Sample table:

script name

date created

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.
Copy linkTweet thisAlerts:
@regagnon_cfp-psauthorApr 16.2014 — 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.
×

Success!

Help @regagnon_cfp-ps spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...