all repos — caroster @ 4e9d21c0ca253718b3f38dcd46c4bfa17db1e3f0

[Octree] Group carpool to your event https://caroster.io

🔧 Send end event email on day after
Tim Izzo tim@octree.ch
Mon, 13 Feb 2023 14:15:29 +0100
commit

4e9d21c0ca253718b3f38dcd46c4bfa17db1e3f0

parent

6d34e82cb7b23a297cb314049eab1a599e50ffd7

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M backend/config/cron-tasks.tsbackend/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"],