Please help a buffoon (me) understand my kindergarten cronjob problem

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

Please help a buffoon (me) understand my kindergarten cronjob problem

Post by /RaspberryPi »

this will be beyond rudimentary for most of you, however I'm a beginner and I'd really appreciate a pointer on where I'm going wrong.
I installed Rclone to back up a small book library folder to google drive, and running it manually works fine.
This is my manual command:
rclone sync -v /home/crispybegs/Calibre\ Library gdrivebooks:/Library
it works perfectly, so all good with that, but i want to set up a schedule so that it runs every 5 minutes unattended and I'm confused about exactly how to do that.
Where I've got to so far is:
1) created an .sh file (is that called a script?) in /etc/systemd/system called rclone-cron.sh
2) inside this script i put rclone sync -v /home/crispybegs/Calibre\ Library gdrivebooks:/Library
3) I created a cronjob to run every 5 minutes that reads:
*/5 * * * * su crispybegs -c "/etc/systemd/system/rclone-cron.sh" > /dev/null 2>&1
But nothing happens after 5 mins, or 10 mins, or 15 mins or ever. Am I totally misunderstanding how to set this up?

submitted by /u/CrispyBegs
[link] [comments]

More...
Post Reply

Return to “Raspberry Pi Forum”