Workflow triggered twice

I have written a workflow which sends an email after scheduled time ends. Sometimes email gets triggers twice. This is an intermittent issue.How to fix this

My guess is that an activity that the workflow invoked failed/timed out and was retried

The best way to understand what happened is by looking at the workflow in UI.