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

Last Reply one year ago By dharmendr

Posted one year 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 one year 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