I am developing a functionality to the users where they add a task to database with DateTime field
,and when the DateTime reached it triggers event that change a filed in other table from "enabled" to "disabled" ,Plus the user can cancel this task before it happen.
so how can I trigger this functionality know that my stack is , NodeJs with NestJs and Prisma ProstgreSql.
i checked @nestjs/schedule and node/cron it seems it's difficult to handel task canceling or recreate the job when the server restart.
any recommendation for NPM packages would be helpful.
Use NestJS lifecycle triggers like onApplicationBootstrap
For stop execution of some DB records add boolean field like execute: false and change it by your API. On next cycle filter records by this field.