Automatically update database Table at specific time using C# and VB.Net in ASP.Net

Last Reply 3 months ago By dharmendr

Posted 3 months ago

In my code, while inserting i am entering status='NEW'. Then i want to update this status='PENDING' after 1 day(24 hours) automatically. Can anybody suggest proper query and where this query to be place in the form.

Posted 3 months ago

Hi sambath,

You need to create Windows Service. The Windows Service will run on every hour (Interval) and will automatically trigger a method to fetch records from database and check the status column if the value is new then update it to pending.

Refer below articles.

Simple Windows Service that runs periodically and once a day at specific time using C# and VB.Net

Automatically send emails daily at specific time using Windows Service in C# and VB.Net