jacobwgillespie / plex-sync

:clapper: Command line utility for synchronizing Plex Media Server watched / seen status between multiple servers
https://www.npmjs.com/package/plex-sync
Other
304 stars 35 forks source link

Just unable to setup a cronjob #86

Closed 2pravin7 closed 3 years ago

2pravin7 commented 3 years ago

Hi All!!

Could someone please assist me with setting up a crontab for this? I am able to run the commands directly and via a bash script works fine too.

Just something via cron isn't working for macOS.

I have the following setup: CRON = 0 * * * * bash ~/cronjob-plex.sh

Permission of cronjob-plex.sh = -rw-r--r--@ 1 USERNAME staff 354 May 4 17:15 cronjob-plex.sh

BODY of cronjob-plex.sh = ——————————

#!/bin/bash

PLEX_TOKEN=T0k3n MATCH_TYPE=fuzzy /usr/local/bin/plex-sync 10.20.30.41/1 10.20.30.42/1

——————————

Thanks, Pravin

2pravin7 commented 3 years ago

Ok.. this worked...

I modified the script to the following:

#!/bin/bash

PATH=/usr/local/bin

PLEX_TOKEN=T0k3n MATCH_TYPE=fuzzy /usr/local/bin/plex-sync 10.20.30.41/1 10.20.30.42/1

Hope this helps someone!