Heat oil in a large non-stick skillet over moderate heat. Add onions and cook, stirring, until golden brown and tender, about 5 minutes.
Stir together sugar, vinegar, bay leaf and cranberries in a large saucepan. Simmer, stirring occasionally, until cranberries begin to pop, about 10 minutes. Remove and discard bay leaf, salt and pepper to taste. Stir in onions and transfer to a bowl to cool.
Chill, covered loosely, until cold, about 1 hour.