Cron Email Conditions: Trigger on Date Criteria

todd.bellamy

New Member
What I would like to do is set a PHP condition on a Cron Email to send the email based off of a date criteria. So for example:

I have a database date field value that has inspection dates for equipment. Seven days before the equipment inspection date is due I would like to send an email. The email part i can do, but it sends an email for every record in the table. Hence; the need for the condition. I have seen similar post that say how to do for a single date, but how about a moving date (sysdate) for example +7.

In SQL it would be "Select * from Table where TABLE.COLUMN >= (sysdate+7)"

However I'm no PHP guru

Any help would be appreciated. And if anyone needs SQL help, but is good with PHP I am willing to do an exchange. :)
 
Can you provide an example of:

Condition - OPTIONAL PHP to evaluate for each row of the table, row will not be processed if you return false. Standard element placeholders can be used, or row data can be accessed from $row array. Remember that this code runs on every row in the table, so keep your code efficient so you don't run in to max execution time issues.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top