Last post Jul 09, 2020 07:58 AM by YihuiSun
Jul 07, 2020 02:36 PM|sandesh pokhrel|LINK
I have database field like:
Id status paymentreceiveDate
1 paid 2020-07-07
I want update status expired after one year automatically, how can I achieve this in mvc.
Jul 07, 2020 02:49 PM|bruce (sqlwork.com)|LINK
Normally you would use a sql agent job. The job could call the website if you want the logic in mvc for some reason.
Jul 07, 2020 03:18 PM|sandesh pokhrel|LINK
Hello bruce can you provide any example or links given to my context?
Jul 07, 2020 05:03 PM|bruce (sqlwork.com)|LINK
Jul 09, 2020 07:58 AM|YihuiSun|LINK
Hi sandesh pokhrel,
You can execute a sql query once a day to check whether your paymentreceiveDate has expired, and if it expires, modify the status value.