[solved] Preventing concurrent instances of rclone from cron

Hi there,

Is there a clever flag in rclone that ensures there is only one instance running?

I plan to use rclone daily from cron but I fully expect the job to sometimes take more than a day. I know I could script around this with lock files and PID files but hey, I’m lazy :-).

Any suggestions?


Just put this on top of your SH script ( change the name to match your script )

if pidof -o %PPID -x "rclone-cron.sh"; then
    exit 1
1 Like

Ah I see - nice. Thanks :-).