# Struggling to schedule an RClone job

**URL:** <https://forum.rclone.org/t/struggling-to-schedule-an-rclone-job/5853>\
**Category:** Help and Support\
**Created:** [June 10, 2018, 6:24pm UTC](https://forum.rclone.org/t/struggling-to-schedule-an-rclone-job/5853 "2018-06-10T18:24:56Z")\
**Posts on this page:** 1\
**Showing post:** 13

<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:** [June 12, 2018, 12:52pm UTC](https://forum.rclone.org/t/struggling-to-schedule-an-rclone-job/5853/13 "2018-06-12T12:52:33Z")

</div>

> [@CraftyClown](#):
>
> Large files are getting copied many times over and I have ended up with 9 copies of a 35gig file! If I keep going like this I’m quickly going to hit the Google daily limit ☹

At a guess you are starting off a new copy before the old one has finished.

This is what I normally use

```auto
LOCKFILE="/var/lock/`basename $0`"

(
    flock -n 9 || {
	echo "$0 already running"
	exit 1
    }

rclone commands go here

) 9>$LOCKFILE

```

---

_[View the full topic](https://forum.rclone.org/t/struggling-to-schedule-an-rclone-job/5853)._
