Skip to content

Commit

Permalink
Merge pull request #589 from AndreyNikiforov/feature/watch
Browse files Browse the repository at this point in the history
add --watch-with-interval parameter
  • Loading branch information
AndreyNikiforov authored Feb 18, 2023
2 parents 6b1206b + d61077d commit 00b8881
Show file tree
Hide file tree
Showing 4 changed files with 525 additions and 317 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## 1.10.0 (2023-02-17)

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

Expand Down
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ Options:
combine with --auto-delete option.
--domain [com|cn] What iCloud root domain to use. Use 'cn' for
mainland China (default: 'com')
--watch-with-interval INTEGER RANGE
Run downloading in a infinite cycle, waiting
specified seconds between runs [x>=1]
--version Show the version and exit.
-h, --help Show this message and exit.
```
Expand Down Expand Up @@ -180,9 +183,20 @@ This error often happens because your account hasn't used the iCloud API before,

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.

## Cron Task
## Watching iCloud for changes

You can run `icloudpd` using `cron` on platforms that support it:
Most used scenario is to run `icloudpd` to periodically download new photots from iCloud. This can be achieved with parameter or external `cron` task.

> If you provide SMTP credentials, the script will send an email notification
> whenever two-step authentication expires.
### With `--watch-with-interval` parameter

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.

### With Cron task

Alternatively, you can run `icloudpd` using `cron` on platforms that support it:

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

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

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

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

Expand Down
Loading

0 comments on commit 00b8881

Please sign in to comment.