(executionDate: Date, execution?: Execution, reason?: SkipReason)
| 222 | } |
| 223 | |
| 224 | private createContext(executionDate: Date, execution?: Execution, reason?: SkipReason): TaskContext{ |
| 225 | const localTime = new LocalizedTime(executionDate, this.timezone) |
| 226 | const ctx: TaskContext = { |
| 227 | date: localTime.toDate(), |
| 228 | dateLocalIso: localTime.toISO(), |
| 229 | triggeredAt: new Date(), |
| 230 | task: this, |
| 231 | execution: execution |
| 232 | } |
| 233 | |
| 234 | if (reason) ctx.reason = reason; |
| 235 | |
| 236 | return ctx; |
| 237 | } |
| 238 | } |