Value of the connection variable '{0}' cannot be null'I

Value of the connection variable '{0}' cannot be null'I

I have a scheduled function that's been running, unchanged, for two years.

A few weeks ago it started throwing this message when it run (at 12:01 a.m.).

I can run it manually, without error.

What does this mean and how do I fix it?