Researched, not yet tested by us.
A phone you no longer use makes a good time-lapse camera. It has a decent lens, plenty of storage, and it charges from any USB power bank. If it gets rained on or taken, you have lost a phone you weren't using.
Most phones have a time-lapse mode in the camera app, but it isn't the right tool here. On the iPhone, the Camera app's Time-lapse chooses its own interval and keeps doubling it the longer you record, throwing away frames as it goes, so even a very long recording comes out at roughly 20 to 40 seconds at 30 frames per second. Built-in time-lapse modes on Android phones generally make a finished video too; check whether yours lets you set the interval and keep the photos.
What you want instead is an app that takes a still photo at a fixed interval of 60 seconds and keeps each one. You then know exactly how many frames you have, and you turn them into a 24-frames-per-second film yourself. See From stills to a film.
OSnap! Pro is a paid time-lapse app whose App Store listing says it can capture "as fast as every 0.25 seconds or as slow as every 48 hours", take unlimited frames, and darken the screen during long captures. Saving each frame to the Photos library during a timed shoot is part of a paid add-on, Export+. Timelapse Camera: Stop Motion lists custom intervals and saves frames to the photo library or Files in JPEG or HEIC. Its listing names intervals of 1 to 5 seconds plus custom ones, but doesn't say whether 60 seconds is possible. Timelapse by ReeLapse lists intervals from 0.5 to 60 seconds, up to 6000 frames, and an optional backup of the individual JPEG frames; it is free with in-app purchases. Check that whichever app you choose lets you set 60 seconds and keep the individual photos.
An iPhone app can't use the camera once it's in the background. Apple's developer documentation puts it plainly: "Camera usage is prohibited while in the background." If the screen locks, or a notification pulls the app away, capture stops.
To prevent that:
Most recent iPhones have OLED screens. Apple says burn-in "can occur in more extreme cases such as when the same high-contrast image is continuously displayed", and suggests lowering brightness when an app keeps the screen on. For a 24-hour run, turn the brightness right down and use the app's dark-screen option if it has one.
Open Camera is free and open source, and it has a Repeat mode that takes photos one after another at a set interval. Its help page describes the settings used below. Open Camera's own settings list offers Repeat counts up to 500, or Unlimited, and Repeat mode intervals from no delay up to 2 hours, including 1m.
Open Camera keeps the screen on while it's the app in front, so leave it there.
Android's app pinning holds one app on screen until you unpin it. Google's steps: turn it on in Settings > Security > Advanced > App pinning, open the app, swipe up and hold to see your recent apps, tap the app's icon and choose Pin. Menu names differ between phone makers.
Then turn on Airplane Mode or Do Not Disturb, remove alarms for the day, and postpone system updates.
Expect to run the phone on a charger or power bank all day. Power and storage has the arithmetic.
Heat is the main risk. Apple says iPhones are designed for use between 0 and 35 °C (32 to 95 °F), and that a hot phone may slow or stop charging, dim the screen, or show a temperature warning. Keep it out of direct sun, take it out of its case, and give it some air.
Charging all day also wears the battery. On iPhone 15 and later you can set a charge limit between 80 and 100 percent under Settings > Battery > Charging. On Pixel 6a and later, Google's battery page explains Settings > Battery > Battery health > Charging optimization > Limit to 80%. Other Android phones may have a similar setting. An old phone's battery may already be worn, which is one more reason to keep it plugged in.
Tip: Run the phone on power for your two-hour test with the screen as dim as it will go, then touch the back. If it's hot indoors, it will be hotter in the sun.
A phone clamp on a small tripod is the simplest mount. Window suction mounts work too, but check the suction holds overnight as the glass cools. Make sure the cable can't tug the phone out of position, and that nothing will press the screen or the buttons.