mandarons / icloud-drive-docker

Dockerized iCloud Client - make a local copy of your iCloud documents and photos, and keep it automatically up-to-date.
BSD 3-Clause "New" or "Revised" License
969 stars 46 forks source link

[FEATURE] Allow retry_login_interval to set to -1 to retry login only once and exit #189

Closed robdejonge closed 4 months ago

robdejonge commented 4 months ago

Thanks again for the great work.

The way I use this container is that I run it once daily. Instead of setting the sync_interval to 86400, I set it to -1 so that it starts the container, runs a single sync, and then exits. This allows me to wrap it in some reporting and I don't have to worry about timing gradually shifting over time.

However, every so often the iCloud needs a new authentication code. And when that fails, the container does not exit. I know when this happens because my phone gets the Apple authentication messages. So I'm wondering: can I get the container to exit after just a single retry? Perhaps by setting retry_login_interval to -1, not something I see in the documentation?

mandarons commented 4 months ago

That's a good idea. Currently, sync_interval set to 0 or less will immediately trigger next sync. Adding run_once like flag would be useful. Let me turn this issue to feature request.

robdejonge commented 4 months ago

I'm confused. The container can already 'run once' only, by setting sync_interval to -1. I've been doing that for a long time now.

My question / request was for a setting to have the container give up authentication after 1 or more fails, rather than keep retrying.

mandarons commented 4 months ago

So sorry. I totally misunderstood your request. Correcting it...

robdejonge commented 4 months ago

Love it, thank you!