Psalms 74:16-17

16Yours is the day, yours also the night;
you have established athe heavenly lights and the sun.
17You have bfixed all the boundaries of the earth;
you have made csummer and winter.

Psalms 104:19

19 He made the moon to mark the dseasons;
Or  the appointed times (compare Genesis 1:14)

the sun knows its time for setting.

Jeremiah 31:35-36

35 Thus says the Lord,
who fgives the sun for light by day
and gthe fixed order of the moon and the stars for light by night,
who stirs up the sea so that its waves roar
hthe Lord of hosts is his name:
36 iIf this fixed order departs
from before me, declares the Lord,
then shall the offspring of Israel cease
from being a nation before me forever.”
Copyright information for ESV