🔧 Send end event email on day after
Tim Izzo tim@octree.ch
Mon, 13 Feb 2023 14:15:29 +0100
1 files changed,
3 insertions(+),
3 deletions(-)
jump to
M
backend/config/cron-tasks.ts
→
backend/config/cron-tasks.ts
@@ -23,13 +23,13 @@ },
/** * Send event recap when it has ended * Only to events with a provided 'date' field - * Everyday at 23:30 + * Everyday at 08:30 */ - "30 23 * * *": async ({ strapi }) => { + "30 8 * * *": async ({ strapi }) => { const events = await strapi.entityService.findMany("api::event.event", { filters: { date: { - $eq: DateTime.now().toISODate(), + $eq: DateTime.now().minus({ day: 1 }).toISODate(), }, }, populate: ["travels", "passengers", "passengers.travel"],