boredazfcuk / docker-icloudpd

An Alpine Linux container for the iCloud Photos Downloader command line utility
1.58k stars 149 forks source link

I want to synchronize time at a fixed interval #480

Closed myderr closed 6 months ago

myderr commented 6 months ago

For example, I want to perform time synchronization at 1 AM every day, and even if I restart the container before that time, it should not trigger the synchronization. Is there a way to achieve this?

boredazfcuk commented 6 months ago

From the config guide:

single_pass: Set this to true to exit out after a single pass instead of looping as per the synchronisation_interval. If this option is used, it will automatically disable the download check. If using this configuration option, the restart policy of the container must be set to "no". If it is set to "always" then the container will instantly relaunch after the first run and you will hammer Apple's website.

Just schedule the container to run at 1am using the host device's scheduling agent.