Skip to content

Commit 00b8881

Browse files
Merge pull request #589 from AndreyNikiforov/feature/watch
add --watch-with-interval parameter
2 parents 6b1206b + d61077d commit 00b8881

File tree

4 files changed

+525
-317
lines changed

4 files changed

+525
-317
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
## 1.10.0 (2023-02-17)
66

7+
- feature: add `--watch-with-interval` parameter [#568](https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/568)
78
- fix: allow spaces in filenames [#378](https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/378)
89
- feature: add `--notification-email-from` parameter [#496](https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/496)
910

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ Options:
118118
combine with --auto-delete option.
119119
--domain [com|cn] What iCloud root domain to use. Use 'cn' for
120120
mainland China (default: 'com')
121+
--watch-with-interval INTEGER RANGE
122+
Run downloading in a infinite cycle, waiting
123+
specified seconds between runs [x>=1]
121124
--version Show the version and exit.
122125
-h, --help Show this message and exit.
123126
```
@@ -180,9 +183,20 @@ This error often happens because your account hasn't used the iCloud API before,
180183

181184
If you are still seeing this message after 30 minutes, then please [open an issue on GitHub](https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/new) and post the script output.
182185

183-
## Cron Task
186+
## Watching iCloud for changes
184187

185-
You can run `icloudpd` using `cron` on platforms that support it:
188+
Most used scenario is to run `icloudpd` to periodically download new photots from iCloud. This can be achieved with parameter or external `cron` task.
189+
190+
> If you provide SMTP credentials, the script will send an email notification
191+
> whenever two-step authentication expires.
192+
193+
### With `--watch-with-interval` parameter
194+
195+
You can use `--watch-with-interval` parameter to keep `icloudpd` watching for iCloud changes. `icloudpd` will indefinately repeat downloading instructions with specified pause between them, except for authentication, which is performed only once.
196+
197+
### With Cron task
198+
199+
Alternatively, you can run `icloudpd` using `cron` on platforms that support it:
186200

187201
- copy the example cron script from source tree, e.g. `cp cron_script.sh.example cron_script.sh`
188202

@@ -196,8 +210,7 @@ You can run `icloudpd` using `cron` on platforms that support it:
196210

197211
Now the script will run every 6 hours to download any new photos and videos.
198212

199-
> If you provide SMTP credentials, the script will send an email notification
200-
> whenever two-step authentication expires.
213+
> `cron` tries to authenticate on each run
201214
202215
## Docker
203216

0 commit comments

Comments
 (0)