Records one execution of a scheduled email, from the moment the run started to the moment it finished. A new row is created each time the schedule fires, so the rows for a scheduled email form its run history. The completed date stays null while a run is still in progress, or if the run never finished.
Group: Database Entities
Implements: Serializable
Properties
| Property | Returns | Description |
|---|---|---|
| completedDate | Date | When this run finished. Null while the run is still in progress, and also null for a run which was interrupted and never completed. |
| id | long | Database identifier for this run, assigned when the row is first saved. |
| scheduledEmail | ScheduledEmail | The scheduled email this run belongs to. Never null, and several runs share the one scheduled email. |
| startDate | Date | When this run began, recorded to the second. Always set, and runs are listed newest first by this date. |
Methods
getId()
Returns: long
Database identifier for this run, assigned when the row is first saved.
getStartDate()
Returns: Date
When this run began, recorded to the second. Always set, and runs are listed newest first by this date.
getCompletedDate()
Returns: Date
When this run finished. Null while the run is still in progress, and also null for a run which was interrupted and never completed.
getScheduledEmail()
Returns: ScheduledEmail
The scheduled email this run belongs to. Never null, and several runs share the one scheduled email.
isExpired(Date now)
Returns: boolean
Reports whether this run is considered expired at the given time. As written, a run which has no completed date is never expired, and a completed run is expired once the given time is more than an hour after its start date.
| Parameter | Description |
|---|---|
now | the time to test the run against, usually the current time |