I'm working with loopback , but now i want to perform some operation on my data after a certain time automaticaly
Precioulsly I have a model called Canal
and my model has a field beginDate
and endDate
of type Date
, beginDate
is set to today date , and endDate
is set to beginDate
plus two dates , so I want to delete Canal
whom endDate
is expired
Any ideas how to process ?
You can use node-schedule to add something like a cron job and run it in specific time each day and delete expired Canals.
You should define it as a boot script in LoopBack.