# How to setup periodic sync in macOS Monterey

**URL:** <https://forum.rclone.org/t/how-to-setup-periodic-sync-in-macos-monterey/27377>\
**Category:** Help and Support\
**Created:** [November 7, 2021, 11:30pm UTC](https://forum.rclone.org/t/how-to-setup-periodic-sync-in-macos-monterey/27377 "2021-11-07T23:30:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sevshelby](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@sevshelby](https://forum.rclone.org/u/sevshelby)\
**Post date:** [November 7, 2021, 11:30pm UTC](https://forum.rclone.org/t/how-to-setup-periodic-sync-in-macos-monterey/27377/1 "2021-11-07T23:30:12Z")

</div>

#### What is the problem you are having with rclone?

I'm trying to setup a periodic sync schedule in macOS Monterey every 30 minutes (unless another sync is already running) that activates automatically on login. The problems I'm having:

- I've tested the attached script below which works in zsh terminal. I tried creating an automator application running the same exact script but when I run the script via the created app, automator says "rclone command not found". Why is that?
- How to run the script on login?
- How to run the script periodically as long as another instance is NOT running?
- **Optional:** How to handle sleep gracefully?

#### What is your rclone version (output from `rclone version`)

rclone version

```auto
rclone v1.57.0
- os/version: darwin 12.0.1 (64 bit)
- os/kernel: 21.1.0 (arm64)
- os/type: darwin
- os/arch: arm64
- go/version: go1.17.2
- go/linking: dynamic
- go/tags: none

```

#### Which OS you are using and how many bits (eg Windows 7, 64 bit)

macOS Monterey 12.01 (64 bit)

#### Which cloud storage system are you using? (eg Google Drive)

Google Drive

#### The command you were trying to run (eg `rclone copy /tmp remote:tmp`)

```auto
rclone sync "/Users/<user name>/google-drive-personal" "gcrypt:/" --exclude "node_modules/**" --log-file "/Users/<user name>/Rclone Latest Logs/rclone-sync-$(date +%FT%T%Z).log" --fast-list --verbose --progress

```

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [November 7, 2021, 11:33pm UTC](https://forum.rclone.org/t/how-to-setup-periodic-sync-in-macos-monterey/27377/2 "2021-11-07T23:33:06Z")

</div>

hello,

tho i do not use macos, on the many platforms i use, i always hardcode the full path of rclone.  
for example, `/usr/bin/rclone`

---

<div class="post-metadata">

**Author:** ![sevshelby](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@sevshelby](https://forum.rclone.org/u/sevshelby)\
**Post date:** [November 8, 2021, 11:07pm UTC](https://forum.rclone.org/t/how-to-setup-periodic-sync-in-macos-monterey/27377/3 "2021-11-08T23:07:09Z")

</div>

> [@asdffdsa](#):
>
> /usr/bin/rclone

Thanks for the response. Trying that gives me a "permission denied" error

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [November 8, 2021, 11:16pm UTC](https://forum.rclone.org/t/how-to-setup-periodic-sync-in-macos-monterey/27377/4 "2021-11-08T23:16:50Z")

</div>

> [@sevshelby](#):
>
> "permission denied" error

is that it, do you have more detail?  
perhaps do a internet search about automator

for the rclone command i would test using a simple command  
`/usr/bin/rclone version --log-level=DEBUG --log-file=/path/to/rclone.log`

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [November 9, 2021, 10:40am UTC](https://forum.rclone.org/t/how-to-setup-periodic-sync-in-macos-monterey/27377/5 "2021-11-09T10:40:58Z")

</div>

I think rclone is installed in `/usr/local/bin/rclone` on macOS (not a mac user!)

If you type `which rclone` in the shell then it will tell you where for definite.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [November 9, 2021, 1:40pm UTC](https://forum.rclone.org/t/how-to-setup-periodic-sync-in-macos-monterey/27377/6 "2021-11-09T13:40:32Z")

</div>

hi, you are correct.

just checked the install.sh, the location of rclone is  
`/usr/local/bin/rclone`

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [December 9, 2021, 1:41pm UTC](https://forum.rclone.org/t/how-to-setup-periodic-sync-in-macos-monterey/27377/7 "2021-12-09T13:41:10Z")

</div>

Closed on December 9, 2021, 1:41pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
