Update Workflow state is the date is passed

I have to update the workflow state to overdue automatically if the Expected completion date is passed

Thank you…

@Dharanipathi

You can go with setting up scheduling task for this.

Like

Go through list of Intercom records daily and if today’s date > Expected completion date and if condition match then set document workflow state as Overdue

how to do this? give an example code please